@@ -92,7 +92,7 @@ fn test_monitor_and_persister_update_fail() {
92
92
send_payment ( & nodes[ 0 ] , & vec ! ( & nodes[ 1 ] ) [ ..] , 10_000_000 ) ;
93
93
94
94
// Route an HTLC from node 0 to node 1 (but don't settle)
95
- let ( preimage, payment_hash, _ ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 9_000_000 ) ;
95
+ let ( preimage, payment_hash, .. ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 9_000_000 ) ;
96
96
97
97
// Make a copy of the ChainMonitor so we can capture the error it returns on a
98
98
// bogus update. Note that if instead we updated the nodes[0]'s ChainMonitor
@@ -286,7 +286,7 @@ fn do_test_monitor_temporary_update_fail(disconnect_count: usize) {
286
286
let mut nodes = create_network ( 2 , & node_cfgs, & node_chanmgrs) ;
287
287
let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 ) . 2 ;
288
288
289
- let ( payment_preimage_1, payment_hash_1, _ ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1_000_000 ) ;
289
+ let ( payment_preimage_1, payment_hash_1, .. ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1_000_000 ) ;
290
290
291
291
// Now try to send a second payment which will fail to send
292
292
let ( route, payment_hash_2, payment_preimage_2, payment_secret_2) = get_route_and_payment_hash ! ( nodes[ 0 ] , nodes[ 1 ] , 1000000 ) ;
@@ -858,7 +858,7 @@ fn do_test_monitor_update_fail_raa(test_ignore_second_cs: bool) {
858
858
send_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 5000000 ) ;
859
859
860
860
// Route a first payment that we'll fail backwards
861
- let ( _, payment_hash_1, _ ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 1000000 ) ;
861
+ let ( _, payment_hash_1, .. ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 1000000 ) ;
862
862
863
863
// Fail the payment backwards, failing the monitor update on nodes[1]'s receipt of the RAA
864
864
nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash_1) ;
@@ -1128,7 +1128,7 @@ fn test_monitor_update_fail_reestablish() {
1128
1128
let chan_1 = create_announced_chan_between_nodes ( & nodes, 0 , 1 ) ;
1129
1129
create_announced_chan_between_nodes ( & nodes, 1 , 2 ) ;
1130
1130
1131
- let ( payment_preimage, payment_hash, _ ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 1_000_000 ) ;
1131
+ let ( payment_preimage, payment_hash, .. ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 1_000_000 ) ;
1132
1132
1133
1133
nodes[ 1 ] . node . peer_disconnected ( & nodes[ 0 ] . node . get_our_node_id ( ) ) ;
1134
1134
nodes[ 0 ] . node . peer_disconnected ( & nodes[ 1 ] . node . get_our_node_id ( ) ) ;
@@ -1344,7 +1344,7 @@ fn claim_while_disconnected_monitor_update_fail() {
1344
1344
let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 ) . 2 ;
1345
1345
1346
1346
// Forward a payment for B to claim
1347
- let ( payment_preimage_1, payment_hash_1, _ ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1_000_000 ) ;
1347
+ let ( payment_preimage_1, payment_hash_1, .. ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1_000_000 ) ;
1348
1348
1349
1349
nodes[ 0 ] . node . peer_disconnected ( & nodes[ 1 ] . node . get_our_node_id ( ) ) ;
1350
1350
nodes[ 1 ] . node . peer_disconnected ( & nodes[ 0 ] . node . get_our_node_id ( ) ) ;
@@ -1644,7 +1644,7 @@ fn test_monitor_update_fail_claim() {
1644
1644
// Rebalance a bit so that we can send backwards from 3 to 2.
1645
1645
send_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 5000000 ) ;
1646
1646
1647
- let ( payment_preimage_1, payment_hash_1, _ ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1_000_000 ) ;
1647
+ let ( payment_preimage_1, payment_hash_1, .. ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1_000_000 ) ;
1648
1648
1649
1649
chanmon_cfgs[ 1 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: InProgress ) ;
1650
1650
nodes[ 1 ] . node . claim_funds ( payment_preimage_1) ;
@@ -1763,7 +1763,7 @@ fn test_monitor_update_on_pending_forwards() {
1763
1763
// Rebalance a bit so that we can send backwards from 3 to 1.
1764
1764
send_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 5000000 ) ;
1765
1765
1766
- let ( _, payment_hash_1, _ ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 1000000 ) ;
1766
+ let ( _, payment_hash_1, .. ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 1000000 ) ;
1767
1767
nodes[ 2 ] . node . fail_htlc_backwards ( & payment_hash_1) ;
1768
1768
expect_pending_htlcs_forwardable_and_htlc_handling_failed ! ( nodes[ 2 ] , vec![ HTLCDestination :: FailedPayment { payment_hash: payment_hash_1 } ] ) ;
1769
1769
check_added_monitors ! ( nodes[ 2 ] , 1 ) ;
@@ -1835,7 +1835,7 @@ fn monitor_update_claim_fail_no_response() {
1835
1835
let channel_id = create_announced_chan_between_nodes ( & nodes, 0 , 1 ) . 2 ;
1836
1836
1837
1837
// Forward a payment for B to claim
1838
- let ( payment_preimage_1, payment_hash_1, _ ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1_000_000 ) ;
1838
+ let ( payment_preimage_1, payment_hash_1, .. ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1_000_000 ) ;
1839
1839
1840
1840
// Now start forwarding a second payment, skipping the last RAA so B is in AwaitingRAA
1841
1841
let ( route, payment_hash_2, payment_preimage_2, payment_secret_2) = get_route_and_payment_hash ! ( nodes[ 0 ] , nodes[ 1 ] , 1000000 ) ;
@@ -2177,7 +2177,7 @@ fn test_fail_htlc_on_broadcast_after_claim() {
2177
2177
create_announced_chan_between_nodes ( & nodes, 0 , 1 ) ;
2178
2178
let chan_id_2 = create_announced_chan_between_nodes ( & nodes, 1 , 2 ) . 2 ;
2179
2179
2180
- let ( payment_preimage, payment_hash, _ ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 2000 ) ;
2180
+ let ( payment_preimage, payment_hash, .. ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 2000 ) ;
2181
2181
2182
2182
let bs_txn = get_local_commitment_txn ! ( nodes[ 2 ] , chan_id_2) ;
2183
2183
assert_eq ! ( bs_txn. len( ) , 1 ) ;
@@ -2343,7 +2343,7 @@ fn do_channel_holding_cell_serialize(disconnect: bool, reload_a: bool) {
2343
2343
//
2344
2344
// Note that because, at the end, MonitorUpdateInProgress is still set, the HTLC generated in
2345
2345
// (c) will not be freed from the holding cell.
2346
- let ( payment_preimage_0, payment_hash_0, _ ) = route_payment ( & nodes[ 1 ] , & [ & nodes[ 0 ] ] , 100_000 ) ;
2346
+ let ( payment_preimage_0, payment_hash_0, .. ) = route_payment ( & nodes[ 1 ] , & [ & nodes[ 0 ] ] , 100_000 ) ;
2347
2347
2348
2348
nodes[ 0 ] . node . send_payment_with_route ( & route, payment_hash_1,
2349
2349
RecipientOnionFields :: secret_only ( payment_secret_1) , PaymentId ( payment_hash_1. 0 ) ) . unwrap ( ) ;
@@ -2517,7 +2517,7 @@ fn do_test_reconnect_dup_htlc_claims(htlc_status: HTLCStatusAtDupClaim, second_f
2517
2517
create_announced_chan_between_nodes ( & nodes, 0 , 1 ) ;
2518
2518
let chan_id_2 = create_announced_chan_between_nodes ( & nodes, 1 , 2 ) . 2 ;
2519
2519
2520
- let ( payment_preimage, payment_hash, _ ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 100_000 ) ;
2520
+ let ( payment_preimage, payment_hash, .. ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] , & nodes[ 2 ] ] , 100_000 ) ;
2521
2521
2522
2522
let mut as_raa = None ;
2523
2523
if htlc_status == HTLCStatusAtDupClaim :: HoldingCell {
@@ -2747,8 +2747,8 @@ fn double_temp_error() {
2747
2747
2748
2748
let ( _, _, channel_id, _) = create_announced_chan_between_nodes ( & nodes, 0 , 1 ) ;
2749
2749
2750
- let ( payment_preimage_1, payment_hash_1, _ ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1_000_000 ) ;
2751
- let ( payment_preimage_2, payment_hash_2, _ ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1_000_000 ) ;
2750
+ let ( payment_preimage_1, payment_hash_1, .. ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1_000_000 ) ;
2751
+ let ( payment_preimage_2, payment_hash_2, .. ) = route_payment ( & nodes[ 0 ] , & [ & nodes[ 1 ] ] , 1_000_000 ) ;
2752
2752
2753
2753
chanmon_cfgs[ 1 ] . persister . set_update_ret ( ChannelMonitorUpdateStatus :: InProgress ) ;
2754
2754
// `claim_funds` results in a ChannelMonitorUpdate.
@@ -3045,8 +3045,8 @@ fn test_blocked_chan_preimage_release() {
3045
3045
3046
3046
// Tee up two payments in opposite directions across nodes[1], one it sent to generate a
3047
3047
// PaymentSent event and one it forwards.
3048
- let ( payment_preimage_1, payment_hash_1, _ ) = route_payment ( & nodes[ 1 ] , & [ & nodes[ 2 ] ] , 1_000_000 ) ;
3049
- let ( payment_preimage_2, payment_hash_2, _ ) = route_payment ( & nodes[ 2 ] , & [ & nodes[ 1 ] , & nodes[ 0 ] ] , 1_000_000 ) ;
3048
+ let ( payment_preimage_1, payment_hash_1, .. ) = route_payment ( & nodes[ 1 ] , & [ & nodes[ 2 ] ] , 1_000_000 ) ;
3049
+ let ( payment_preimage_2, payment_hash_2, .. ) = route_payment ( & nodes[ 2 ] , & [ & nodes[ 1 ] , & nodes[ 0 ] ] , 1_000_000 ) ;
3050
3050
3051
3051
// Claim the first payment to get a `PaymentSent` event (but don't handle it yet).
3052
3052
nodes[ 2 ] . node . claim_funds ( payment_preimage_1) ;
0 commit comments