Skip to content

Commit 1ef597b

Browse files
committed
f: onion_payloads option
1 parent 336399e commit 1ef597b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lightning/src/ln/onion_utils.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,16 +350,14 @@ pub(super) fn build_onion_payloads<'a>(
350350
);
351351

352352
// don't include blinded tail when Trampoline hops are present
353-
let blinded_tail_with_hop_iter = if path.trampoline_hops.is_empty() {
353+
let blinded_tail_with_hop_iter = path.trampoline_hops.is_empty().then(|| {
354354
path.blinded_tail.as_ref().map(|bt| BlindedTailHopIter {
355355
hops: bt.hops.iter(),
356356
blinding_point: bt.blinding_point,
357357
final_value_msat: bt.final_value_msat,
358358
excess_final_cltv_expiry_delta: bt.excess_final_cltv_expiry_delta,
359359
})
360-
} else {
361-
None
362-
};
360+
}).flatten();
363361

364362
let (value_msat, cltv) = build_onion_payloads_callback(
365363
path.hops.iter(),

0 commit comments

Comments
 (0)