Skip to content

Commit e51038a

Browse files
f simplify skip
1 parent 7c459ce commit e51038a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lightning/src/blinded_path/payment.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ pub(super) fn compute_payinfo(
191191
// Get an iterator over `(curr_hop_tlvs..last_intermediate_hop_tlvs]`.
192192
let next_nodes = intermediate_nodes.iter()
193193
.enumerate()
194-
.skip_while(|(i, _)| *i != idx)
195-
.skip(1)
194+
.skip(idx + 1)
196195
.map(|(_, (_, tlvs))| tlvs);
197196
for node in next_nodes {
198197
// The min htlc for a hop is that hop's htlc_minimum_msat minus the following hops' fees

0 commit comments

Comments
 (0)