@@ -1912,7 +1912,7 @@ fn test_htlc_on_chain_timeout() {
1912
1912
// Broadcast legit commitment tx from C on B's chain
1913
1913
let commitment_tx = nodes[ 2 ] . node . channel_state . lock ( ) . unwrap ( ) . by_id . get ( & chan_2. 2 ) . unwrap ( ) . last_local_commitment_txn . clone ( ) ;
1914
1914
check_spends ! ( commitment_tx[ 0 ] , chan_2. 3 . clone( ) ) ;
1915
- nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash, 0 ) ;
1915
+ nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
1916
1916
check_added_monitors ! ( nodes[ 2 ] , 0 ) ;
1917
1917
expect_pending_htlcs_forwardable ! ( nodes[ 2 ] ) ;
1918
1918
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
@@ -2093,7 +2093,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(deliver_bs_raa: bool, use
2093
2093
let ( _, second_payment_hash) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , value) ;
2094
2094
let ( _, third_payment_hash) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , value) ;
2095
2095
2096
- assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & first_payment_hash, 0 ) ) ;
2096
+ assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & first_payment_hash) ) ;
2097
2097
expect_pending_htlcs_forwardable ! ( nodes[ 2 ] ) ;
2098
2098
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
2099
2099
let updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
@@ -2106,7 +2106,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(deliver_bs_raa: bool, use
2106
2106
let bs_raa = commitment_signed_dance ! ( nodes[ 1 ] , nodes[ 2 ] , updates. commitment_signed, false , true , false , true ) ;
2107
2107
// Drop the last RAA from 3 -> 2
2108
2108
2109
- assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & second_payment_hash, 0 ) ) ;
2109
+ assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & second_payment_hash) ) ;
2110
2110
expect_pending_htlcs_forwardable ! ( nodes[ 2 ] ) ;
2111
2111
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
2112
2112
let updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
@@ -2123,7 +2123,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(deliver_bs_raa: bool, use
2123
2123
nodes[ 2 ] . node . handle_revoke_and_ack ( & nodes[ 1 ] . node . get_our_node_id ( ) , & as_raa) . unwrap ( ) ;
2124
2124
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
2125
2125
2126
- assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & third_payment_hash, 0 ) ) ;
2126
+ assert ! ( nodes[ 2 ] . node. fail_htlc_backwards( & third_payment_hash) ) ;
2127
2127
expect_pending_htlcs_forwardable ! ( nodes[ 2 ] ) ;
2128
2128
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
2129
2129
let updates = get_htlc_update_msgs ! ( nodes[ 2 ] , nodes[ 1 ] . node. get_our_node_id( ) ) ;
@@ -3769,10 +3769,10 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
3769
3769
3770
3770
// Now fail back three of the over-dust-limit and three of the under-dust-limit payments in one go.
3771
3771
// Fail 0th below-dust, 4th above-dust, 8th above-dust, 10th below-dust HTLCs
3772
- assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_1, ds_dust_limit * 1000 ) ) ;
3773
- assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_3, 1000000 ) ) ;
3774
- assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_5, 1000000 ) ) ;
3775
- assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_6, ds_dust_limit * 1000 ) ) ;
3772
+ assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_1) ) ;
3773
+ assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_3) ) ;
3774
+ assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_5) ) ;
3775
+ assert ! ( nodes[ 4 ] . node. fail_htlc_backwards( & payment_hash_6) ) ;
3776
3776
check_added_monitors ! ( nodes[ 4 ] , 0 ) ;
3777
3777
expect_pending_htlcs_forwardable ! ( nodes[ 4 ] ) ;
3778
3778
check_added_monitors ! ( nodes[ 4 ] , 1 ) ;
@@ -3785,8 +3785,8 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
3785
3785
commitment_signed_dance ! ( nodes[ 3 ] , nodes[ 4 ] , four_removes. commitment_signed, false ) ;
3786
3786
3787
3787
// Fail 3rd below-dust and 7th above-dust HTLCs
3788
- assert ! ( nodes[ 5 ] . node. fail_htlc_backwards( & payment_hash_2, ds_dust_limit * 1000 ) ) ;
3789
- assert ! ( nodes[ 5 ] . node. fail_htlc_backwards( & payment_hash_4, 1000000 ) ) ;
3788
+ assert ! ( nodes[ 5 ] . node. fail_htlc_backwards( & payment_hash_2) ) ;
3789
+ assert ! ( nodes[ 5 ] . node. fail_htlc_backwards( & payment_hash_4) ) ;
3790
3790
check_added_monitors ! ( nodes[ 5 ] , 0 ) ;
3791
3791
expect_pending_htlcs_forwardable ! ( nodes[ 5 ] ) ;
3792
3792
check_added_monitors ! ( nodes[ 5 ] , 1 ) ;
@@ -4079,7 +4079,7 @@ fn do_htlc_claim_previous_remote_commitment_only(use_dust: bool, check_revoke_no
4079
4079
// actually revoked.
4080
4080
let htlc_value = if use_dust { 50000 } else { 3000000 } ;
4081
4081
let ( _, our_payment_hash) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , htlc_value) ;
4082
- assert ! ( nodes[ 1 ] . node. fail_htlc_backwards( & our_payment_hash, htlc_value ) ) ;
4082
+ assert ! ( nodes[ 1 ] . node. fail_htlc_backwards( & our_payment_hash) ) ;
4083
4083
expect_pending_htlcs_forwardable ! ( nodes[ 1 ] ) ;
4084
4084
check_added_monitors ! ( nodes[ 1 ] , 1 ) ;
4085
4085
@@ -4405,7 +4405,7 @@ fn test_onion_failure() {
4405
4405
let onion_keys = onion_utils:: construct_onion_keys ( & Secp256k1 :: new ( ) , & route, & session_priv) . unwrap ( ) ;
4406
4406
msg. reason = onion_utils:: build_first_hop_failure_packet ( & onion_keys[ 1 ] . shared_secret [ ..] , NODE |2 , & [ 0 ; 0 ] ) ;
4407
4407
} , ||{
4408
- nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash, 0 ) ;
4408
+ nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
4409
4409
} , true , Some ( NODE |2 ) , Some ( msgs:: HTLCFailChannelUpdate :: NodeFailure { node_id : route. hops [ 1 ] . pubkey , is_permanent : false } ) ) ;
4410
4410
4411
4411
// intermediate node failure
@@ -4423,7 +4423,7 @@ fn test_onion_failure() {
4423
4423
let onion_keys = onion_utils:: construct_onion_keys ( & Secp256k1 :: new ( ) , & route, & session_priv) . unwrap ( ) ;
4424
4424
msg. reason = onion_utils:: build_first_hop_failure_packet ( & onion_keys[ 1 ] . shared_secret [ ..] , PERM |NODE |2 , & [ 0 ; 0 ] ) ;
4425
4425
} , ||{
4426
- nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash, 0 ) ;
4426
+ nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
4427
4427
} , false , Some ( PERM |NODE |2 ) , Some ( msgs:: HTLCFailChannelUpdate :: NodeFailure { node_id : route. hops [ 1 ] . pubkey , is_permanent : true } ) ) ;
4428
4428
4429
4429
// intermediate node failure
@@ -4434,7 +4434,7 @@ fn test_onion_failure() {
4434
4434
let onion_keys = onion_utils:: construct_onion_keys ( & Secp256k1 :: new ( ) , & route, & session_priv) . unwrap ( ) ;
4435
4435
msg. reason = onion_utils:: build_first_hop_failure_packet ( & onion_keys[ 0 ] . shared_secret [ ..] , PERM |NODE |3 , & [ 0 ; 0 ] ) ;
4436
4436
} , ||{
4437
- nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash, 0 ) ;
4437
+ nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
4438
4438
} , true , Some ( PERM |NODE |3 ) , Some ( msgs:: HTLCFailChannelUpdate :: NodeFailure { node_id : route. hops [ 0 ] . pubkey , is_permanent : true } ) ) ;
4439
4439
4440
4440
// final node failure
@@ -4443,7 +4443,7 @@ fn test_onion_failure() {
4443
4443
let onion_keys = onion_utils:: construct_onion_keys ( & Secp256k1 :: new ( ) , & route, & session_priv) . unwrap ( ) ;
4444
4444
msg. reason = onion_utils:: build_first_hop_failure_packet ( & onion_keys[ 1 ] . shared_secret [ ..] , PERM |NODE |3 , & [ 0 ; 0 ] ) ;
4445
4445
} , ||{
4446
- nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash, 0 ) ;
4446
+ nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
4447
4447
} , false , Some ( PERM |NODE |3 ) , Some ( msgs:: HTLCFailChannelUpdate :: NodeFailure { node_id : route. hops [ 1 ] . pubkey , is_permanent : true } ) ) ;
4448
4448
4449
4449
run_onion_failure_test ( "invalid_onion_version" , 0 , & nodes, & route, & payment_hash, |msg| { msg. onion_routing_packet . version = 1 ; } , ||{ } , true ,
@@ -4510,7 +4510,7 @@ fn test_onion_failure() {
4510
4510
} , ||{ } , true , Some ( UPDATE |14 ) , Some ( msgs:: HTLCFailChannelUpdate :: ChannelUpdateMessage { msg : ChannelUpdate :: dummy ( ) } ) ) ;
4511
4511
4512
4512
run_onion_failure_test ( "unknown_payment_hash" , 2 , & nodes, & route, & payment_hash, |_| { } , || {
4513
- nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash, 0 ) ;
4513
+ nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash) ;
4514
4514
} , false , Some ( PERM |15 ) , None ) ;
4515
4515
4516
4516
run_onion_failure_test ( "final_expiry_too_soon" , 1 , & nodes, & route, & payment_hash, |msg| {
0 commit comments