@@ -2038,7 +2038,7 @@ fn test_htlc_on_chain_timeout() {
2038
2038
// Broadcast legit commitment tx from C on B's chain
2039
2039
let commitment_tx = nodes[ 2 ] . node . channel_state . lock ( ) . unwrap ( ) . by_id . get ( & chan_2. 2 ) . unwrap ( ) . last_local_commitment_txn . clone ( ) ;
2040
2040
check_spends ! ( commitment_tx[ 0 ] , chan_2. 3 . clone( ) ) ;
2041
- nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash, 0 ) ;
2041
+ nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
2042
2042
check_added_monitors ! ( nodes[ 2 ] , 0 ) ;
2043
2043
expect_pending_htlcs_forwardable ! ( nodes[ 2 ] ) ;
2044
2044
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
@@ -2219,7 +2219,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(deliver_bs_raa: bool, use
2219
2219
let ( _, second_payment_hash) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , value) ;
2220
2220
let ( _, third_payment_hash) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , value) ;
2221
2221
2222
- assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & first_payment_hash, 0 ) ) ;
2222
+ assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & first_payment_hash) ) ;
2223
2223
expect_pending_htlcs_forwardable ! ( nodes[ 2 ] ) ;
2224
2224
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
2225
2225
let updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
@@ -2232,7 +2232,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(deliver_bs_raa: bool, use
2232
2232
let bs_raa = commitment_signed_dance ! ( nodes[ 1 ] , nodes[ 2 ] , updates. commitment_signed, false , true , false , true ) ;
2233
2233
// Drop the last RAA from 3 -> 2
2234
2234
2235
- assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & second_payment_hash, 0 ) ) ;
2235
+ assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & second_payment_hash) ) ;
2236
2236
expect_pending_htlcs_forwardable ! ( nodes[ 2 ] ) ;
2237
2237
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
2238
2238
let updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
@@ -2249,7 +2249,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(deliver_bs_raa: bool, use
2249
2249
nodes[ 2 ] . node . handle_revoke_and_ack ( & nodes[ 1 ] . node . get_our_node_id ( ) , & as_raa) . unwrap ( ) ;
2250
2250
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
2251
2251
2252
- assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & third_payment_hash, 0 ) ) ;
2252
+ assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & third_payment_hash) ) ;
2253
2253
expect_pending_htlcs_forwardable ! ( nodes[ 2 ] ) ;
2254
2254
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
2255
2255
let updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
@@ -3895,10 +3895,10 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
3895
3895
3896
3896
// Now fail back three of the over-dust-limit and three of the under-dust-limit payments in one go.
3897
3897
// Fail 0th below-dust, 4th above-dust, 8th above-dust, 10th below-dust HTLCs
3898
- assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_1, ds_dust_limit * 1000 ) ) ;
3899
- assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_3, 1000000 ) ) ;
3900
- assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_5, 1000000 ) ) ;
3901
- assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_6, ds_dust_limit * 1000 ) ) ;
3898
+ assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_1) ) ;
3899
+ assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_3) ) ;
3900
+ assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_5) ) ;
3901
+ assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_6) ) ;
3902
3902
check_added_monitors ! ( nodes[ 4 ] , 0 ) ;
3903
3903
expect_pending_htlcs_forwardable ! ( nodes[ 4 ] ) ;
3904
3904
check_added_monitors ! ( nodes[ 4 ] , 1 ) ;
@@ -3911,8 +3911,8 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
3911
3911
commitment_signed_dance ! ( nodes[ 3 ] , nodes[ 4 ] , four_removes. commitment_signed, false ) ;
3912
3912
3913
3913
// Fail 3rd below-dust and 7th above-dust HTLCs
3914
- assert ! ( nodes[ 5 ] . node. fail_htlc_backwards( & payment_hash_2, ds_dust_limit * 1000 ) ) ;
3915
- assert ! ( nodes[ 5 ] . node. fail_htlc_backwards( & payment_hash_4, 1000000 ) ) ;
3914
+ assert ! ( nodes[ 5 ] . node. fail_htlc_backwards( & payment_hash_2) ) ;
3915
+ assert ! ( nodes[ 5 ] . node. fail_htlc_backwards( & payment_hash_4) ) ;
3916
3916
check_added_monitors ! ( nodes[ 5 ] , 0 ) ;
3917
3917
expect_pending_htlcs_forwardable ! ( nodes[ 5 ] ) ;
3918
3918
check_added_monitors ! ( nodes[ 5 ] , 1 ) ;
@@ -4205,7 +4205,7 @@ fn do_htlc_claim_previous_remote_commitment_only(use_dust: bool, check_revoke_no
4205
4205
// actually revoked.
4206
4206
let htlc_value = if use_dust { 50000 } else { 3000000 } ;
4207
4207
let ( _, our_payment_hash) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , htlc_value) ;
4208
- assert ! ( nodes[ 1 ] . node. fail_htlc_backwards( & our_payment_hash, htlc_value ) ) ;
4208
+ assert ! ( nodes[ 1 ] . node. fail_htlc_backwards( & our_payment_hash) ) ;
4209
4209
expect_pending_htlcs_forwardable ! ( nodes[ 1 ] ) ;
4210
4210
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
4211
4211
@@ -4531,7 +4531,7 @@ fn test_onion_failure() {
4531
4531
let onion_keys = onion_utils:: construct_onion_keys ( & Secp256k1 :: new ( ) , & route, & session_priv) . unwrap ( ) ;
4532
4532
msg. reason = onion_utils:: build_first_hop_failure_packet ( & onion_keys[ 1 ] . shared_secret [ ..] , NODE |2 , & [ 0 ; 0 ] ) ;
4533
4533
} , ||{
4534
- nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash, 0 ) ;
4534
+ nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
4535
4535
} , true , Some ( NODE |2 ) , Some ( msgs:: HTLCFailChannelUpdate :: NodeFailure { node_id : route. hops [ 1 ] . pubkey , is_permanent : false } ) ) ;
4536
4536
4537
4537
// intermediate node failure
@@ -4549,7 +4549,7 @@ fn test_onion_failure() {
4549
4549
let onion_keys = onion_utils:: construct_onion_keys ( & Secp256k1 :: new ( ) , & route, & session_priv) . unwrap ( ) ;
4550
4550
msg. reason = onion_utils:: build_first_hop_failure_packet ( & onion_keys[ 1 ] . shared_secret [ ..] , PERM |NODE |2 , & [ 0 ; 0 ] ) ;
4551
4551
} , ||{
4552
- nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash, 0 ) ;
4552
+ nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
4553
4553
} , false , Some ( PERM |NODE |2 ) , Some ( msgs:: HTLCFailChannelUpdate :: NodeFailure { node_id : route. hops [ 1 ] . pubkey , is_permanent : true } ) ) ;
4554
4554
4555
4555
// intermediate node failure
@@ -4560,7 +4560,7 @@ fn test_onion_failure() {
4560
4560
let onion_keys = onion_utils:: construct_onion_keys ( & Secp256k1 :: new ( ) , & route, & session_priv) . unwrap ( ) ;
4561
4561
msg. reason = onion_utils:: build_first_hop_failure_packet ( & onion_keys[ 0 ] . shared_secret [ ..] , PERM |NODE |3 , & [ 0 ; 0 ] ) ;
4562
4562
} , ||{
4563
- nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash, 0 ) ;
4563
+ nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
4564
4564
} , true , Some ( PERM |NODE |3 ) , Some ( msgs:: HTLCFailChannelUpdate :: NodeFailure { node_id : route. hops [ 0 ] . pubkey , is_permanent : true } ) ) ;
4565
4565
4566
4566
// final node failure
@@ -4569,7 +4569,7 @@ fn test_onion_failure() {
4569
4569
let onion_keys = onion_utils:: construct_onion_keys ( & Secp256k1 :: new ( ) , & route, & session_priv) . unwrap ( ) ;
4570
4570
msg. reason = onion_utils:: build_first_hop_failure_packet ( & onion_keys[ 1 ] . shared_secret [ ..] , PERM |NODE |3 , & [ 0 ; 0 ] ) ;
4571
4571
} , ||{
4572
- nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash, 0 ) ;
4572
+ nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
4573
4573
} , false , Some ( PERM |NODE |3 ) , Some ( msgs:: HTLCFailChannelUpdate :: NodeFailure { node_id : route. hops [ 1 ] . pubkey , is_permanent : true } ) ) ;
4574
4574
4575
4575
run_onion_failure_test ( "invalid_onion_version" , 0 , & nodes, & route, & payment_hash, |msg| { msg. onion_routing_packet . version = 1 ; } , ||{ } , true ,
@@ -4636,7 +4636,7 @@ fn test_onion_failure() {
4636
4636
} , ||{ } , true , Some ( UPDATE |14 ) , Some ( msgs:: HTLCFailChannelUpdate :: ChannelUpdateMessage { msg : ChannelUpdate :: dummy ( ) } ) ) ;
4637
4637
4638
4638
run_onion_failure_test ( "unknown_payment_hash" , 2 , & nodes, & route, & payment_hash, |_| { } , || {
4639
- nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash, 0 ) ;
4639
+ nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
4640
4640
} , false , Some ( PERM |15 ) , None ) ;
4641
4641
4642
4642
run_onion_failure_test ( "final_expiry_too_soon" , 1 , & nodes, & route, & payment_hash, |msg| {
0 commit comments