@@ -4104,31 +4104,34 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
4104
4104
send_payment ( & nodes[ 1 ] , & [ & nodes[ 2 ] , & nodes[ 3 ] , & nodes[ 5 ] ] , 500000 ) ;
4105
4105
assert_eq ! ( get_local_commitment_txn!( nodes[ 3 ] , chan_2_3. 2 ) [ 0 ] . output. len( ) , 2 ) ;
4106
4106
4107
- let ds_dust_limit = {
4107
+ let dust_limit_msat = {
4108
4108
let per_peer_state_lock;
4109
4109
let mut peer_state_lock;
4110
4110
let chan =
4111
4111
get_channel_ref ! ( nodes[ 3 ] , nodes[ 2 ] , per_peer_state_lock, peer_state_lock, chan_2_3. 2 ) ;
4112
- chan. context ( ) . holder_dust_limit_satoshis
4112
+ chan. context ( ) . holder_dust_limit_satoshis * 1000
4113
4113
} ;
4114
4114
4115
4115
// 0th HTLC (not added - smaller than dust limit + HTLC tx fee):
4116
4116
let path_4: & [ _ ] = & [ & nodes[ 2 ] , & nodes[ 3 ] , & nodes[ 4 ] ] ;
4117
- let ( _, hash_1, ..) = route_payment ( & nodes[ 0 ] , path_4, ds_dust_limit * 1000 ) ;
4117
+ let ( _, hash_1, ..) = route_payment ( & nodes[ 0 ] , path_4, dust_limit_msat ) ;
4118
4118
4119
4119
// 1st HTLC (not added - smaller than dust limit + HTLC tx fee):
4120
- let ( _, hash_2, ..) = route_payment ( & nodes[ 0 ] , path_4, ds_dust_limit * 1000 ) ;
4121
- let ( route , _, _, _) = get_route_and_payment_hash ! ( nodes[ 1 ] , nodes[ 5 ] , ds_dust_limit * 1000 ) ;
4120
+ let ( _, hash_2, ..) = route_payment ( & nodes[ 0 ] , path_4, dust_limit_msat ) ;
4121
+ let ( route_to_5 , _, _, _) = get_route_and_payment_hash ! ( nodes[ 1 ] , nodes[ 5 ] , dust_limit_msat ) ;
4122
4122
4123
4123
// 2nd HTLC (not added - smaller than dust limit + HTLC tx fee):
4124
4124
let path_5: & [ & [ _ ] ] = & [ & [ & nodes[ 2 ] , & nodes[ 3 ] , & nodes[ 5 ] ] ] ;
4125
- let secret = nodes[ 5 ] . node . create_inbound_payment_for_hash ( hash_1, None , 7200 , None ) . unwrap ( ) ;
4126
- let route_2 = route. clone ( ) ;
4127
- send_along_route_with_secret ( & nodes[ 1 ] , route_2, path_5, ds_dust_limit* 1000 , hash_1, secret) ;
4125
+ let payment_secret =
4126
+ nodes[ 5 ] . node . create_inbound_payment_for_hash ( hash_1, None , 7200 , None ) . unwrap ( ) ;
4127
+ let route = route_to_5. clone ( ) ;
4128
+ send_along_route_with_secret ( & nodes[ 1 ] , route, path_5, dust_limit_msat, hash_1, payment_secret) ;
4128
4129
4129
4130
// 3rd HTLC (not added - smaller than dust limit + HTLC tx fee):
4130
- let secret = nodes[ 5 ] . node . create_inbound_payment_for_hash ( hash_2, None , 7200 , None ) . unwrap ( ) ;
4131
- send_along_route_with_secret ( & nodes[ 1 ] , route, path_5, ds_dust_limit* 1000 , hash_2, secret) ;
4131
+ let payment_secret =
4132
+ nodes[ 5 ] . node . create_inbound_payment_for_hash ( hash_2, None , 7200 , None ) . unwrap ( ) ;
4133
+ let route = route_to_5;
4134
+ send_along_route_with_secret ( & nodes[ 1 ] , route, path_5, dust_limit_msat, hash_2, payment_secret) ;
4132
4135
4133
4136
// 4th HTLC:
4134
4137
let ( _, hash_3, ..) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 2 ] , & nodes[ 3 ] , & nodes[ 4 ] ] , 1000000 ) ;
@@ -4138,28 +4141,32 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
4138
4141
let ( route, _, _, _) = get_route_and_payment_hash ! ( nodes[ 1 ] , nodes[ 5 ] , 1000000 ) ;
4139
4142
4140
4143
// 6th HTLC:
4141
- let secret = nodes[ 5 ] . node . create_inbound_payment_for_hash ( hash_3, None , 7200 , None ) . unwrap ( ) ;
4142
- send_along_route_with_secret ( & nodes[ 1 ] , route. clone ( ) , path_5, 1000000 , hash_3, secret) ;
4144
+ let payment_secret =
4145
+ nodes[ 5 ] . node . create_inbound_payment_for_hash ( hash_3, None , 7200 , None ) . unwrap ( ) ;
4146
+ send_along_route_with_secret ( & nodes[ 1 ] , route. clone ( ) , path_5, 1000000 , hash_3, payment_secret) ;
4143
4147
4144
4148
// 7th HTLC:
4145
- let secret = nodes[ 5 ] . node . create_inbound_payment_for_hash ( hash_4, None , 7200 , None ) . unwrap ( ) ;
4146
- send_along_route_with_secret ( & nodes[ 1 ] , route, path_5, 1000000 , hash_4, secret) ;
4149
+ let payment_secret =
4150
+ nodes[ 5 ] . node . create_inbound_payment_for_hash ( hash_4, None , 7200 , None ) . unwrap ( ) ;
4151
+ send_along_route_with_secret ( & nodes[ 1 ] , route, path_5, 1000000 , hash_4, payment_secret) ;
4147
4152
4148
4153
// 8th HTLC:
4149
4154
let ( _, hash_5, ..) = route_payment ( & nodes[ 0 ] , path_4, 1000000 ) ;
4150
4155
4151
4156
// 9th HTLC (not added - smaller than dust limit + HTLC tx fee):
4152
- let ( route, _, _, _) = get_route_and_payment_hash ! ( nodes[ 1 ] , nodes[ 5 ] , ds_dust_limit* 1000 ) ;
4153
- let secret = nodes[ 5 ] . node . create_inbound_payment_for_hash ( hash_5, None , 7200 , None ) . unwrap ( ) ;
4154
- send_along_route_with_secret ( & nodes[ 1 ] , route, path_5, ds_dust_limit* 1000 , hash_5, secret) ;
4157
+ let ( route, _, _, _) = get_route_and_payment_hash ! ( nodes[ 1 ] , nodes[ 5 ] , dust_limit_msat) ;
4158
+ let payment_secret =
4159
+ nodes[ 5 ] . node . create_inbound_payment_for_hash ( hash_5, None , 7200 , None ) . unwrap ( ) ;
4160
+ send_along_route_with_secret ( & nodes[ 1 ] , route, path_5, dust_limit_msat, hash_5, payment_secret) ;
4155
4161
4156
4162
// 10th HTLC (not added - smaller than dust limit + HTLC tx fee):
4157
- let ( _, hash_6, ..) = route_payment ( & nodes[ 0 ] , path_4, ds_dust_limit * 1000 ) ;
4163
+ let ( _, hash_6, ..) = route_payment ( & nodes[ 0 ] , path_4, dust_limit_msat ) ;
4158
4164
4159
4165
// 11th HTLC:
4160
4166
let ( route, _, _, _) = get_route_and_payment_hash ! ( nodes[ 1 ] , nodes[ 5 ] , 1000000 ) ;
4161
- let secret = nodes[ 5 ] . node . create_inbound_payment_for_hash ( hash_6, None , 7200 , None ) . unwrap ( ) ;
4162
- send_along_route_with_secret ( & nodes[ 1 ] , route, path_5, 1000000 , hash_6, secret) ;
4167
+ let payment_secret =
4168
+ nodes[ 5 ] . node . create_inbound_payment_for_hash ( hash_6, None , 7200 , None ) . unwrap ( ) ;
4169
+ send_along_route_with_secret ( & nodes[ 1 ] , route, path_5, 1000000 , hash_6, payment_secret) ;
4163
4170
4164
4171
// Double-check that six of the new HTLC were added
4165
4172
// We now have six HTLCs pending over the dust limit and six HTLCs under the dust limit (ie,
@@ -6683,7 +6690,8 @@ pub fn test_onion_value_mpp_set_calculation() {
6683
6690
6684
6691
let total_msat = 100_000 ;
6685
6692
let expected_paths: & [ & [ & Node ] ] = & [ & [ & nodes[ 1 ] , & nodes[ 3 ] ] , & [ & nodes[ 2 ] , & nodes[ 3 ] ] ] ;
6686
- let ( mut route, hash, preimage, secret) = get_route_and_payment_hash ! ( & nodes[ 0 ] , nodes[ 3 ] , total_msat) ;
6693
+ let ( mut route, hash, preimage, payment_secret) =
6694
+ get_route_and_payment_hash ! ( & nodes[ 0 ] , nodes[ 3 ] , total_msat) ;
6687
6695
let sample_path = route. paths . pop ( ) . unwrap ( ) ;
6688
6696
6689
6697
let mut path_1 = sample_path. clone ( ) ;
@@ -6704,7 +6712,7 @@ pub fn test_onion_value_mpp_set_calculation() {
6704
6712
6705
6713
// Send payment
6706
6714
let id = PaymentId ( nodes[ 0 ] . keys_manager . backing . get_secure_random_bytes ( ) ) ;
6707
- let onion = RecipientOnionFields :: secret_only ( secret ) ;
6715
+ let onion = RecipientOnionFields :: secret_only ( payment_secret ) ;
6708
6716
let onion_session_privs = nodes[ 0 ]
6709
6717
. node
6710
6718
. test_add_new_pending_payment ( hash, onion. clone ( ) , id, & route)
@@ -6732,7 +6740,7 @@ pub fn test_onion_value_mpp_set_calculation() {
6732
6740
let height = nodes[ 0 ] . best_block_info ( ) . 1 ;
6733
6741
let session_priv = SecretKey :: from_slice ( & session_priv) . unwrap ( ) ;
6734
6742
let mut onion_keys = onion_utils:: construct_onion_keys ( & Secp256k1 :: new ( ) , & route. paths [ 0 ] , & session_priv) ;
6735
- let recipient_onion_fields = RecipientOnionFields :: secret_only ( secret ) ;
6743
+ let recipient_onion_fields = RecipientOnionFields :: secret_only ( payment_secret ) ;
6736
6744
let ( mut onion_payloads, _, _) = onion_utils:: build_onion_payloads ( & route. paths [ 0 ] , 100_000 ,
6737
6745
& recipient_onion_fields, height + 1 , & None , None , None ) . unwrap ( ) ;
6738
6746
// Edit amt_to_forward to simulate the sender having set
@@ -6769,7 +6777,8 @@ pub fn test_onion_value_mpp_set_calculation() {
6769
6777
6770
6778
// Second path
6771
6779
let ev = remove_first_msg_event_to_node ( & expected_paths[ 1 ] [ 0 ] . node . get_our_node_id ( ) , & mut events) ;
6772
- pass_along_path ( & nodes[ 0 ] , expected_paths[ 1 ] , 101_000 , hash, Some ( secret) , ev, true , None ) ;
6780
+ let payment_secret = Some ( payment_secret) ;
6781
+ pass_along_path ( & nodes[ 0 ] , expected_paths[ 1 ] , 101_000 , hash, payment_secret, ev, true , None ) ;
6773
6782
6774
6783
claim_payment_along_route (
6775
6784
ClaimAlongRouteArgs :: new ( & nodes[ 0 ] , expected_paths, preimage)
@@ -6808,7 +6817,7 @@ fn do_test_overshoot_mpp(msat_amounts: &[u64], total_msat: u64){
6808
6817
6809
6818
// Create a route for each amount
6810
6819
let example_amount = 100000 ;
6811
- let ( mut route, hash, preimage, secret ) = get_route_and_payment_hash ! ( & nodes[ src_idx] , nodes[ dst_idx] , example_amount) ;
6820
+ let ( mut route, hash, preimage, payment_secret ) = get_route_and_payment_hash ! ( & nodes[ src_idx] , nodes[ dst_idx] , example_amount) ;
6812
6821
let sample_path = route. paths . pop ( ) . unwrap ( ) ;
6813
6822
for i in 0 ..routing_node_count {
6814
6823
let routing_node = 2 + i;
@@ -6823,12 +6832,12 @@ fn do_test_overshoot_mpp(msat_amounts: &[u64], total_msat: u64){
6823
6832
6824
6833
// Send payment with manually set total_msat
6825
6834
let id = PaymentId ( nodes[ src_idx] . keys_manager . backing . get_secure_random_bytes ( ) ) ;
6826
- let onion = RecipientOnionFields :: secret_only ( secret ) ;
6835
+ let onion = RecipientOnionFields :: secret_only ( payment_secret ) ;
6827
6836
let onion_session_privs = nodes[ src_idx]
6828
6837
. node
6829
6838
. test_add_new_pending_payment ( hash, onion, id, & route)
6830
6839
. unwrap ( ) ;
6831
- let onion = RecipientOnionFields :: secret_only ( secret ) ;
6840
+ let onion = RecipientOnionFields :: secret_only ( payment_secret ) ;
6832
6841
let amt = Some ( total_msat) ;
6833
6842
nodes[ src_idx]
6834
6843
. node
@@ -6845,7 +6854,7 @@ fn do_test_overshoot_mpp(msat_amounts: &[u64], total_msat: u64){
6845
6854
let current_path_amount = msat_amounts[ path_idx] ;
6846
6855
amount_received += current_path_amount;
6847
6856
let became_claimable_now = amount_received >= total_msat && amount_received - current_path_amount < total_msat;
6848
- pass_along_path ( & nodes[ src_idx] , expected_path, amount_received, hash. clone ( ) , Some ( secret ) , ev, became_claimable_now, None ) ;
6857
+ pass_along_path ( & nodes[ src_idx] , expected_path, amount_received, hash. clone ( ) , Some ( payment_secret ) , ev, became_claimable_now, None ) ;
6849
6858
}
6850
6859
6851
6860
claim_payment_along_route (
@@ -8355,7 +8364,7 @@ pub fn test_inconsistent_mpp_params() {
8355
8364
core:: cmp:: Ordering :: Less } else { core:: cmp:: Ordering :: Greater }
8356
8365
} ) ;
8357
8366
8358
- let ( preimage, hash, secret ) = get_payment_preimage_hash ! ( & nodes[ 3 ] ) ;
8367
+ let ( preimage, hash, payment_secret ) = get_payment_preimage_hash ! ( & nodes[ 3 ] ) ;
8359
8368
8360
8369
let cur_height = nodes[ 0 ] . best_block_info ( ) . 1 ;
8361
8370
let id = PaymentId ( [ 42 ; 32 ] ) ;
@@ -8365,10 +8374,10 @@ pub fn test_inconsistent_mpp_params() {
8365
8374
// ultimately have, just not right away.
8366
8375
let mut dup_route = route. clone ( ) ;
8367
8376
dup_route. paths . push ( route. paths [ 1 ] . clone ( ) ) ;
8368
- let onion = RecipientOnionFields :: secret_only ( secret ) ;
8377
+ let onion = RecipientOnionFields :: secret_only ( payment_secret ) ;
8369
8378
nodes[ 0 ] . node . test_add_new_pending_payment ( hash, onion, id, & dup_route) . unwrap ( )
8370
8379
} ;
8371
- let onion = RecipientOnionFields :: secret_only ( secret ) ;
8380
+ let onion = RecipientOnionFields :: secret_only ( payment_secret ) ;
8372
8381
let path_a = & route. paths [ 0 ] ;
8373
8382
let real_amt = 15_000_000 ;
8374
8383
let priv_a = session_privs[ 0 ] ;
@@ -8382,11 +8391,11 @@ pub fn test_inconsistent_mpp_params() {
8382
8391
assert_eq ! ( events. len( ) , 1 ) ;
8383
8392
let path_a = & [ & nodes[ 1 ] , & nodes[ 3 ] ] ;
8384
8393
let event = events. pop ( ) . unwrap ( ) ;
8385
- pass_along_path ( & nodes[ 0 ] , path_a, real_amt, hash, Some ( secret ) , event, false , None ) ;
8394
+ pass_along_path ( & nodes[ 0 ] , path_a, real_amt, hash, Some ( payment_secret ) , event, false , None ) ;
8386
8395
assert ! ( nodes[ 3 ] . node. get_and_clear_pending_events( ) . is_empty( ) ) ;
8387
8396
8388
8397
let path_b = & route. paths [ 1 ] ;
8389
- let onion = RecipientOnionFields :: secret_only ( secret ) ;
8398
+ let onion = RecipientOnionFields :: secret_only ( payment_secret ) ;
8390
8399
let amt_b = 14_000_000 ;
8391
8400
let priv_b = session_privs[ 1 ] ;
8392
8401
nodes[ 0 ]
@@ -8440,7 +8449,7 @@ pub fn test_inconsistent_mpp_params() {
8440
8449
let conditions = PaymentFailedConditions :: new ( ) . mpp_parts_remain ( ) ;
8441
8450
expect_payment_failed_conditions ( & nodes[ 0 ] , hash, true , conditions) ;
8442
8451
8443
- let onion = RecipientOnionFields :: secret_only ( secret ) ;
8452
+ let onion = RecipientOnionFields :: secret_only ( payment_secret ) ;
8444
8453
let path_b = & route. paths [ 1 ] ;
8445
8454
let priv_c = session_privs[ 2 ] ;
8446
8455
nodes[ 0 ]
@@ -8453,7 +8462,7 @@ pub fn test_inconsistent_mpp_params() {
8453
8462
assert_eq ! ( events. len( ) , 1 ) ;
8454
8463
let event = events. pop ( ) . unwrap ( ) ;
8455
8464
let path_b = & [ & nodes[ 2 ] , & nodes[ 3 ] ] ;
8456
- pass_along_path ( & nodes[ 0 ] , path_b, real_amt, hash, Some ( secret ) , event, true , None ) ;
8465
+ pass_along_path ( & nodes[ 0 ] , path_b, real_amt, hash, Some ( payment_secret ) , event, true , None ) ;
8457
8466
8458
8467
do_claim_payment_along_route (
8459
8468
ClaimAlongRouteArgs :: new ( & nodes[ 0 ] , & [ path_a, path_b] , preimage)
@@ -8479,7 +8488,7 @@ pub fn test_double_partial_claim() {
8479
8488
create_announced_chan_between_nodes_with_value ( & nodes, 1 , 3 , 100_000 , 0 ) ;
8480
8489
create_announced_chan_between_nodes_with_value ( & nodes, 2 , 3 , 100_000 , 0 ) ;
8481
8490
8482
- let ( mut route, payment_hash , payment_preimage, secret ) = get_route_and_payment_hash ! ( nodes[ 0 ] , nodes[ 3 ] , 15_000_000 ) ;
8491
+ let ( mut route, hash , payment_preimage, payment_secret ) = get_route_and_payment_hash ! ( nodes[ 0 ] , nodes[ 3 ] , 15_000_000 ) ;
8483
8492
assert_eq ! ( route. paths. len( ) , 2 ) ;
8484
8493
route. paths . sort_by ( |path_a, _| {
8485
8494
// Sort the path so that the path through nodes[1] comes first
@@ -8488,7 +8497,7 @@ pub fn test_double_partial_claim() {
8488
8497
} ) ;
8489
8498
8490
8499
let paths: & [ & [ _ ] ] = & [ & [ & nodes[ 1 ] , & nodes[ 3 ] ] , & [ & nodes[ 2 ] , & nodes[ 3 ] ] ] ;
8491
- send_along_route_with_secret ( & nodes[ 0 ] , route. clone ( ) , paths, 15_000_000 , payment_hash , secret ) ;
8500
+ send_along_route_with_secret ( & nodes[ 0 ] , route. clone ( ) , paths, 15_000_000 , hash , payment_secret ) ;
8492
8501
// nodes[3] has now received a PaymentClaimable event...which it will take some (exorbitant)
8493
8502
// amount of time to respond to.
8494
8503
@@ -8497,25 +8506,25 @@ pub fn test_double_partial_claim() {
8497
8506
connect_blocks ( & nodes[ 0 ] , TEST_FINAL_CLTV ) ; // To get the same height for sending later
8498
8507
8499
8508
let failed_destinations = vec ! [
8500
- HTLCHandlingFailureType :: Receive { payment_hash } ,
8501
- HTLCHandlingFailureType :: Receive { payment_hash } ,
8509
+ HTLCHandlingFailureType :: Receive { payment_hash: hash } ,
8510
+ HTLCHandlingFailureType :: Receive { payment_hash: hash } ,
8502
8511
] ;
8503
8512
expect_pending_htlcs_forwardable_and_htlc_handling_failed ! ( nodes[ 3 ] , failed_destinations) ;
8504
8513
8505
8514
let reason = PaymentFailureReason :: RecipientRejected ;
8506
- pass_failed_payment_back ( & nodes[ 0 ] , paths, false , payment_hash , reason) ;
8515
+ pass_failed_payment_back ( & nodes[ 0 ] , paths, false , hash , reason) ;
8507
8516
8508
8517
// nodes[1] now retries one of the two paths...
8509
- let onion = RecipientOnionFields :: secret_only ( secret ) ;
8510
- let id = PaymentId ( payment_hash . 0 ) ;
8511
- nodes[ 0 ] . node . send_payment_with_route ( route, payment_hash , onion, id) . unwrap ( ) ;
8518
+ let onion = RecipientOnionFields :: secret_only ( payment_secret ) ;
8519
+ let id = PaymentId ( hash . 0 ) ;
8520
+ nodes[ 0 ] . node . send_payment_with_route ( route, hash , onion, id) . unwrap ( ) ;
8512
8521
check_added_monitors ! ( nodes[ 0 ] , 2 ) ;
8513
8522
8514
8523
let mut events = nodes[ 0 ] . node . get_and_clear_pending_msg_events ( ) ;
8515
8524
assert_eq ! ( events. len( ) , 2 ) ;
8516
8525
let msgs = remove_first_msg_event_to_node ( & node_b_id, & mut events) ;
8517
8526
let path = & [ & nodes[ 1 ] , & nodes[ 3 ] ] ;
8518
- pass_along_path ( & nodes[ 0 ] , path, 15_000_000 , payment_hash , Some ( secret ) , msgs, false , None ) ;
8527
+ pass_along_path ( & nodes[ 0 ] , path, 15_000_000 , hash , Some ( payment_secret ) , msgs, false , None ) ;
8519
8528
8520
8529
// At this point nodes[3] has received one half of the payment, and the user goes to handle
8521
8530
// that PaymentClaimable event they got hours ago and never handled...we should refuse to claim.
@@ -9263,20 +9272,20 @@ fn do_payment_with_custom_min_final_cltv_expiry(valid_delta: bool, use_user_hash
9263
9272
9264
9273
let payment_parameters =
9265
9274
PaymentParameters :: from_node_id ( node_b_id, final_cltv_expiry_delta as u32 ) ;
9266
- let ( hash, payment_preimage, secret ) = if use_user_hash {
9267
- let ( payment_preimage, hash, secret ) =
9275
+ let ( hash, payment_preimage, payment_secret ) = if use_user_hash {
9276
+ let ( payment_preimage, hash, payment_secret ) =
9268
9277
get_payment_preimage_hash ! ( nodes[ 1 ] , Some ( recv_value) , Some ( min_cltv_expiry_delta) ) ;
9269
- ( hash, payment_preimage, secret )
9278
+ ( hash, payment_preimage, payment_secret )
9270
9279
} else {
9271
- let ( hash, secret ) =
9280
+ let ( hash, payment_secret ) =
9272
9281
nodes[ 1 ]
9273
9282
. node
9274
9283
. create_inbound_payment ( Some ( recv_value) , 7200 , Some ( min_cltv_expiry_delta) )
9275
9284
. unwrap ( ) ;
9276
- ( hash, nodes[ 1 ] . node . get_payment_preimage ( hash, secret ) . unwrap ( ) , secret )
9285
+ ( hash, nodes[ 1 ] . node . get_payment_preimage ( hash, payment_secret ) . unwrap ( ) , payment_secret )
9277
9286
} ;
9278
9287
let route = get_route ! ( nodes[ 0 ] , payment_parameters, recv_value) . unwrap ( ) ;
9279
- let onion = RecipientOnionFields :: secret_only ( secret ) ;
9288
+ let onion = RecipientOnionFields :: secret_only ( payment_secret ) ;
9280
9289
nodes[ 0 ] . node . send_payment_with_route ( route, hash, onion, PaymentId ( hash. 0 ) ) . unwrap ( ) ;
9281
9290
check_added_monitors ! ( nodes[ 0 ] , 1 ) ;
9282
9291
let mut events = nodes[ 0 ] . node . get_and_clear_pending_msg_events ( ) ;
@@ -9288,7 +9297,7 @@ fn do_payment_with_custom_min_final_cltv_expiry(valid_delta: bool, use_user_hash
9288
9297
9289
9298
if valid_delta {
9290
9299
let preimage = if use_user_hash { None } else { Some ( payment_preimage) } ;
9291
- expect_payment_claimable ! ( nodes[ 1 ] , hash, secret , recv_value, preimage, node_b_id) ;
9300
+ expect_payment_claimable ! ( nodes[ 1 ] , hash, payment_secret , recv_value, preimage, node_b_id) ;
9292
9301
9293
9302
claim_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , payment_preimage) ;
9294
9303
} else {
0 commit comments