Skip to content

Commit d5fff03

Browse files
f PushFront not Insert
1 parent 56e83b8 commit d5fff03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/ln/onion_utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ struct BlindedTailHopIter<'a, I: Iterator<Item = &'a BlindedHop>> {
182182
}
183183
enum PayloadCallbackAction {
184184
PushBack,
185-
Insert { idx: usize },
185+
PushFront,
186186
}
187187
fn build_onion_payloads_callback<'a, H, B, F>(
188188
hops: H, mut blinded_tail: Option<BlindedTailHopIter<'a, B>>, total_msat: u64,
@@ -265,7 +265,7 @@ where
265265
amt_to_forward: value_msat,
266266
outgoing_cltv_value: cltv,
267267
};
268-
callback(PayloadCallbackAction::Insert { idx: 0 }, payload);
268+
callback(PayloadCallbackAction::PushFront, payload);
269269
}
270270
cur_value_msat += hop.fee_msat;
271271
if cur_value_msat >= 21000000 * 100000000 * 1000 {
@@ -304,7 +304,7 @@ pub(super) fn build_onion_payloads<'a>(
304304
keysend_preimage,
305305
|action, payload| match action {
306306
PayloadCallbackAction::PushBack => res.push(payload),
307-
PayloadCallbackAction::Insert { idx } => res.insert(idx, payload),
307+
PayloadCallbackAction::PushFront => res.insert(0, payload),
308308
},
309309
)?;
310310
Ok((res, value_msat, cltv))

0 commit comments

Comments
 (0)