Skip to content

Commit 7f7fb79

Browse files
Rename test var to be more descriptive.
1 parent 50d940b commit 7f7fb79

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/ln/blinded_payment_tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,19 +560,19 @@ fn do_multi_hop_receiver_fail(check: ReceiveCheckFail) {
560560
};
561561

562562
let amt_msat = 5000;
563-
let final_cltv_delta = if check == ReceiveCheckFail::ProcessPendingHTLCsCheck {
563+
let excess_final_cltv_delta_opt = if check == ReceiveCheckFail::ProcessPendingHTLCsCheck {
564564
// Set the final CLTV expiry too low to trigger the failure in process_pending_htlc_forwards.
565565
Some(TEST_FINAL_CLTV as u16 - 2)
566566
} else { None };
567-
let (_, payment_hash, payment_secret) = get_payment_preimage_hash(&nodes[2], Some(amt_msat), final_cltv_delta);
567+
let (_, payment_hash, payment_secret) = get_payment_preimage_hash(&nodes[2], Some(amt_msat), excess_final_cltv_delta_opt);
568568
let mut route_params = get_blinded_route_parameters(amt_msat, payment_secret,
569569
nodes.iter().skip(1).map(|n| n.node.get_our_node_id()).collect(), &[&chan_upd_1_2],
570570
&chanmon_cfgs[2].keys_manager);
571571

572572
let route = if check == ReceiveCheckFail::ProcessPendingHTLCsCheck {
573573
let mut route = get_route(&nodes[0], &route_params).unwrap();
574574
// Set the final CLTV expiry too low to trigger the failure in process_pending_htlc_forwards.
575-
route.paths[0].blinded_tail.as_mut().map(|bt| bt.excess_final_cltv_expiry_delta = TEST_FINAL_CLTV - 2);
575+
route.paths[0].blinded_tail.as_mut().map(|bt| bt.excess_final_cltv_expiry_delta = excess_final_cltv_delta_opt.unwrap() as u32);
576576
route
577577
} else if check == ReceiveCheckFail::PaymentConstraints {
578578
// Create a blinded path where the receiver's encrypted payload has an htlc_minimum_msat that is

0 commit comments

Comments
 (0)