Skip to content

Commit bd3c6dd

Browse files
f simpify check
1 parent ca33379 commit bd3c6dd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lightning/src/ln/onion_utils.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,7 @@ where L::Target: Logger {
438438
// The failing hop includes either the inbound channel to the recipient or the outbound channel
439439
// from the current hop (i.e., the next hop's inbound channel).
440440
let num_blinded_hops = path.blinded_tail.as_ref().map_or(0, |t| t.hops.len());
441-
is_from_final_node = route_hop_idx + 1 == path.hops.len() &&
442-
(path.blinded_tail.is_none() || num_blinded_hops == 1);
441+
is_from_final_node = route_hop_idx + 1 == path.hops.len() && num_blinded_hops <= 1;
443442

444443
if !fixed_time_eq(&Hmac::from_engine(hmac).into_inner(), &err_packet.hmac) { return }
445444
let error_code_slice = match err_packet.failuremsg.get(0..2) {

0 commit comments

Comments
 (0)