@@ -418,7 +418,7 @@ fn test_fee_failures() {
418418 // If the hop gives fee_insufficient but enough fees were provided, then the previous hop
419419 // malleated the payment before forwarding, taking funds when they shouldn't have. However,
420420 // because we ignore channel update contents, we will still blame the 2nd channel.
421- let ( _, payment_hash, payment_secret) = get_payment_preimage_hash ! ( nodes[ 2 ] ) ;
421+ let ( _, payment_hash, payment_secret) = get_payment_preimage_hash ( & nodes[ 2 ] , None , None ) ;
422422 let short_channel_id = channels[ 1 ] . 0 . contents . short_channel_id ;
423423 run_onion_failure_test (
424424 "fee_insufficient" ,
@@ -449,7 +449,7 @@ fn test_fee_failures() {
449449 }
450450
451451 let ( payment_preimage_success, payment_hash_success, payment_secret_success) =
452- get_payment_preimage_hash ! ( nodes[ 2 ] ) ;
452+ get_payment_preimage_hash ( & nodes[ 2 ] , None , None ) ;
453453 let recipient_onion = RecipientOnionFields :: secret_only ( payment_secret_success) ;
454454 let payment_id = PaymentId ( payment_hash_success. 0 ) ;
455455 nodes[ 0 ]
@@ -667,7 +667,7 @@ fn test_onion_failure() {
667667 Some ( route. paths [ 0 ] . hops [ 1 ] . short_channel_id ) ,
668668 None ,
669669 ) ;
670- let ( _, payment_hash, payment_secret) = get_payment_preimage_hash ! ( nodes[ 2 ] ) ;
670+ let ( _, payment_hash, payment_secret) = get_payment_preimage_hash ( & nodes[ 2 ] , None , None ) ;
671671
672672 // intermediate node failure
673673 run_onion_failure_test_with_fail_intercept (
@@ -738,7 +738,7 @@ fn test_onion_failure() {
738738 Some ( route. paths [ 0 ] . hops [ 1 ] . short_channel_id ) ,
739739 None ,
740740 ) ;
741- let ( _, payment_hash, payment_secret) = get_payment_preimage_hash ! ( nodes[ 2 ] ) ;
741+ let ( _, payment_hash, payment_secret) = get_payment_preimage_hash ( & nodes[ 2 ] , None , None ) ;
742742
743743 // intermediate node failure
744744 run_onion_failure_test_with_fail_intercept (
@@ -811,7 +811,7 @@ fn test_onion_failure() {
811811 Some ( route. paths [ 0 ] . hops [ 1 ] . short_channel_id ) ,
812812 None ,
813813 ) ;
814- let ( _, payment_hash, payment_secret) = get_payment_preimage_hash ! ( nodes[ 2 ] ) ;
814+ let ( _, payment_hash, payment_secret) = get_payment_preimage_hash ( & nodes[ 2 ] , None , None ) ;
815815
816816 // Our immediate peer sent UpdateFailMalformedHTLC because it couldn't understand the onion in
817817 // the UpdateAddHTLC that we sent.
@@ -1142,7 +1142,7 @@ fn test_onion_failure() {
11421142 None ,
11431143 None ,
11441144 ) ;
1145- let ( _, payment_hash, payment_secret) = get_payment_preimage_hash ! ( nodes[ 2 ] ) ;
1145+ let ( _, payment_hash, payment_secret) = get_payment_preimage_hash ( & nodes[ 2 ] , None , None ) ;
11461146
11471147 run_onion_failure_test (
11481148 "final_expiry_too_soon" ,
@@ -2426,7 +2426,7 @@ fn test_phantom_onion_hmac_failure() {
24262426 // Get the route.
24272427 let recv_value_msat = 10_000 ;
24282428 let ( _, payment_hash, payment_secret) =
2429- get_payment_preimage_hash ! ( nodes[ 1 ] , Some ( recv_value_msat) ) ;
2429+ get_payment_preimage_hash ( & nodes[ 1 ] , Some ( recv_value_msat) , None ) ;
24302430 let ( route, phantom_scid) = get_phantom_route ! ( nodes, recv_value_msat, channel) ;
24312431
24322432 // Route the HTLC through to the destination.
@@ -2496,7 +2496,7 @@ fn test_phantom_invalid_onion_payload() {
24962496 // Get the route.
24972497 let recv_value_msat = 10_000 ;
24982498 let ( _, payment_hash, payment_secret) =
2499- get_payment_preimage_hash ! ( nodes[ 1 ] , Some ( recv_value_msat) ) ;
2499+ get_payment_preimage_hash ( & nodes[ 1 ] , Some ( recv_value_msat) , None ) ;
25002500 let ( route, phantom_scid) = get_phantom_route ! ( nodes, recv_value_msat, channel) ;
25012501
25022502 // We'll use the session priv later when constructing an invalid onion packet.
@@ -2598,7 +2598,7 @@ fn test_phantom_final_incorrect_cltv_expiry() {
25982598 // Get the route.
25992599 let recv_value_msat = 10_000 ;
26002600 let ( _, payment_hash, payment_secret) =
2601- get_payment_preimage_hash ! ( nodes[ 1 ] , Some ( recv_value_msat) ) ;
2601+ get_payment_preimage_hash ( & nodes[ 1 ] , Some ( recv_value_msat) , None ) ;
26022602 let ( route, phantom_scid) = get_phantom_route ! ( nodes, recv_value_msat, channel) ;
26032603
26042604 // Route the HTLC through to the destination.
@@ -2664,7 +2664,7 @@ fn test_phantom_failure_too_low_cltv() {
26642664 // Get the route.
26652665 let recv_value_msat = 10_000 ;
26662666 let ( _, payment_hash, payment_secret) =
2667- get_payment_preimage_hash ! ( nodes[ 1 ] , Some ( recv_value_msat) ) ;
2667+ get_payment_preimage_hash ( & nodes[ 1 ] , Some ( recv_value_msat) , None ) ;
26682668 let ( mut route, phantom_scid) = get_phantom_route ! ( nodes, recv_value_msat, channel) ;
26692669
26702670 // Modify the route to have a too-low cltv.
@@ -2720,7 +2720,7 @@ fn test_phantom_failure_modified_cltv() {
27202720 // Get the route.
27212721 let recv_value_msat = 10_000 ;
27222722 let ( _, payment_hash, payment_secret) =
2723- get_payment_preimage_hash ! ( nodes[ 1 ] , Some ( recv_value_msat) ) ;
2723+ get_payment_preimage_hash ( & nodes[ 1 ] , Some ( recv_value_msat) , None ) ;
27242724 let ( mut route, phantom_scid) = get_phantom_route ! ( nodes, recv_value_msat, channel) ;
27252725
27262726 // Route the HTLC through to the destination.
@@ -2775,7 +2775,7 @@ fn test_phantom_failure_expires_too_soon() {
27752775 // Get the route.
27762776 let recv_value_msat = 10_000 ;
27772777 let ( _, payment_hash, payment_secret) =
2778- get_payment_preimage_hash ! ( nodes[ 1 ] , Some ( recv_value_msat) ) ;
2778+ get_payment_preimage_hash ( & nodes[ 1 ] , Some ( recv_value_msat) , None ) ;
27792779 let ( mut route, phantom_scid) = get_phantom_route ! ( nodes, recv_value_msat, channel) ;
27802780
27812781 // Route the HTLC through to the destination.
@@ -2825,7 +2825,7 @@ fn test_phantom_failure_too_low_recv_amt() {
28252825 let recv_amt_msat = 10_000 ;
28262826 let bad_recv_amt_msat = recv_amt_msat - 10 ;
28272827 let ( _, payment_hash, payment_secret) =
2828- get_payment_preimage_hash ! ( nodes[ 1 ] , Some ( recv_amt_msat) ) ;
2828+ get_payment_preimage_hash ( & nodes[ 1 ] , Some ( recv_amt_msat) , None ) ;
28292829 let ( mut route, phantom_scid) = get_phantom_route ! ( nodes, bad_recv_amt_msat, channel) ;
28302830
28312831 // Route the HTLC through to the destination.
@@ -2894,7 +2894,7 @@ fn do_test_phantom_dust_exposure_failure(multiplier_dust_limit: bool) {
28942894
28952895 // Get the route with an amount exceeding the dust exposure threshold of nodes[1].
28962896 let ( _, payment_hash, payment_secret) =
2897- get_payment_preimage_hash ! ( nodes[ 1 ] , Some ( max_dust_exposure + 1 ) ) ;
2897+ get_payment_preimage_hash ( & nodes[ 1 ] , Some ( max_dust_exposure + 1 ) , None ) ;
28982898 let ( mut route, phantom_scid) = get_phantom_route ! ( nodes, max_dust_exposure + 1 , channel) ;
28992899
29002900 // Route the HTLC through to the destination.
@@ -2944,7 +2944,7 @@ fn test_phantom_failure_reject_payment() {
29442944 // Get the route with a too-low amount.
29452945 let recv_amt_msat = 10_000 ;
29462946 let ( _, payment_hash, payment_secret) =
2947- get_payment_preimage_hash ! ( nodes[ 1 ] , Some ( recv_amt_msat) ) ;
2947+ get_payment_preimage_hash ( & nodes[ 1 ] , Some ( recv_amt_msat) , None ) ;
29482948 let ( mut route, phantom_scid) = get_phantom_route ! ( nodes, recv_amt_msat, channel) ;
29492949
29502950 // Route the HTLC through to the destination.
0 commit comments