Skip to content

Commit abceb1b

Browse files
committed
.. instead of _,_
1 parent 549f599 commit abceb1b

File tree

9 files changed

+102
-102
lines changed

9 files changed

+102
-102
lines changed

lightning/src/chain/chainmonitor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -854,8 +854,8 @@ mod tests {
854854
create_announced_chan_between_nodes(&nodes, 0, 1);
855855

856856
// Route two payments to be claimed at the same time.
857-
let (payment_preimage_1, payment_hash_1, _, _) = route_payment(&nodes[0], &[&nodes[1]], 1_000_000);
858-
let (payment_preimage_2, payment_hash_2, _, _) = route_payment(&nodes[0], &[&nodes[1]], 1_000_000);
857+
let (payment_preimage_1, payment_hash_1, ..) = route_payment(&nodes[0], &[&nodes[1]], 1_000_000);
858+
let (payment_preimage_2, payment_hash_2, ..) = route_payment(&nodes[0], &[&nodes[1]], 1_000_000);
859859

860860
chanmon_cfgs[1].persister.offchain_monitor_updates.lock().unwrap().clear();
861861
chanmon_cfgs[1].persister.set_update_ret(ChannelMonitorUpdateStatus::InProgress);
@@ -962,7 +962,7 @@ mod tests {
962962
let (route, second_payment_hash, _, second_payment_secret) = get_route_and_payment_hash!(nodes[0], nodes[1], 100_000);
963963

964964
// First route a payment that we will claim on chain and give the recipient the preimage.
965-
let (payment_preimage, payment_hash, _, _) = route_payment(&nodes[0], &[&nodes[1]], 1_000_000);
965+
let (payment_preimage, payment_hash, ..) = route_payment(&nodes[0], &[&nodes[1]], 1_000_000);
966966
nodes[1].node.claim_funds(payment_preimage);
967967
expect_payment_claimed!(nodes[1], payment_hash, 1_000_000);
968968
nodes[1].node.get_and_clear_pending_msg_events();

lightning/src/ln/chanmon_update_fail_tests.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn test_monitor_and_persister_update_fail() {
9292
send_payment(&nodes[0], &vec!(&nodes[1])[..], 10_000_000);
9393

9494
// 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);
9696

9797
// Make a copy of the ChainMonitor so we can capture the error it returns on a
9898
// 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) {
286286
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
287287
let channel_id = create_announced_chan_between_nodes(&nodes, 0, 1).2;
288288

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);
290290

291291
// Now try to send a second payment which will fail to send
292292
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) {
858858
send_payment(&nodes[0], &[&nodes[1], &nodes[2]], 5000000);
859859

860860
// 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);
862862

863863
// Fail the payment backwards, failing the monitor update on nodes[1]'s receipt of the RAA
864864
nodes[2].node.fail_htlc_backwards(&payment_hash_1);
@@ -1128,7 +1128,7 @@ fn test_monitor_update_fail_reestablish() {
11281128
let chan_1 = create_announced_chan_between_nodes(&nodes, 0, 1);
11291129
create_announced_chan_between_nodes(&nodes, 1, 2);
11301130

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);
11321132

11331133
nodes[1].node.peer_disconnected(&nodes[0].node.get_our_node_id());
11341134
nodes[0].node.peer_disconnected(&nodes[1].node.get_our_node_id());
@@ -1344,7 +1344,7 @@ fn claim_while_disconnected_monitor_update_fail() {
13441344
let channel_id = create_announced_chan_between_nodes(&nodes, 0, 1).2;
13451345

13461346
// 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);
13481348

13491349
nodes[0].node.peer_disconnected(&nodes[1].node.get_our_node_id());
13501350
nodes[1].node.peer_disconnected(&nodes[0].node.get_our_node_id());
@@ -1644,7 +1644,7 @@ fn test_monitor_update_fail_claim() {
16441644
// Rebalance a bit so that we can send backwards from 3 to 2.
16451645
send_payment(&nodes[0], &[&nodes[1], &nodes[2]], 5000000);
16461646

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);
16481648

16491649
chanmon_cfgs[1].persister.set_update_ret(ChannelMonitorUpdateStatus::InProgress);
16501650
nodes[1].node.claim_funds(payment_preimage_1);
@@ -1763,7 +1763,7 @@ fn test_monitor_update_on_pending_forwards() {
17631763
// Rebalance a bit so that we can send backwards from 3 to 1.
17641764
send_payment(&nodes[0], &[&nodes[1], &nodes[2]], 5000000);
17651765

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);
17671767
nodes[2].node.fail_htlc_backwards(&payment_hash_1);
17681768
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[2], vec![HTLCDestination::FailedPayment { payment_hash: payment_hash_1 }]);
17691769
check_added_monitors!(nodes[2], 1);
@@ -1835,7 +1835,7 @@ fn monitor_update_claim_fail_no_response() {
18351835
let channel_id = create_announced_chan_between_nodes(&nodes, 0, 1).2;
18361836

18371837
// 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);
18391839

18401840
// Now start forwarding a second payment, skipping the last RAA so B is in AwaitingRAA
18411841
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() {
21772177
create_announced_chan_between_nodes(&nodes, 0, 1);
21782178
let chan_id_2 = create_announced_chan_between_nodes(&nodes, 1, 2).2;
21792179

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);
21812181

21822182
let bs_txn = get_local_commitment_txn!(nodes[2], chan_id_2);
21832183
assert_eq!(bs_txn.len(), 1);
@@ -2343,7 +2343,7 @@ fn do_channel_holding_cell_serialize(disconnect: bool, reload_a: bool) {
23432343
//
23442344
// Note that because, at the end, MonitorUpdateInProgress is still set, the HTLC generated in
23452345
// (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);
23472347

23482348
nodes[0].node.send_payment_with_route(&route, payment_hash_1,
23492349
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
25172517
create_announced_chan_between_nodes(&nodes, 0, 1);
25182518
let chan_id_2 = create_announced_chan_between_nodes(&nodes, 1, 2).2;
25192519

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);
25212521

25222522
let mut as_raa = None;
25232523
if htlc_status == HTLCStatusAtDupClaim::HoldingCell {
@@ -2747,8 +2747,8 @@ fn double_temp_error() {
27472747

27482748
let (_, _, channel_id, _) = create_announced_chan_between_nodes(&nodes, 0, 1);
27492749

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);
27522752

27532753
chanmon_cfgs[1].persister.set_update_ret(ChannelMonitorUpdateStatus::InProgress);
27542754
// `claim_funds` results in a ChannelMonitorUpdate.
@@ -3045,8 +3045,8 @@ fn test_blocked_chan_preimage_release() {
30453045

30463046
// Tee up two payments in opposite directions across nodes[1], one it sent to generate a
30473047
// 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);
30503050

30513051
// Claim the first payment to get a `PaymentSent` event (but don't handle it yet).
30523052
nodes[2].node.claim_funds(payment_preimage_1);

lightning/src/ln/channelmanager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9831,7 +9831,7 @@ mod tests {
98319831

98329832
// To start (1), send a regular payment but don't claim it.
98339833
let expected_route = [&nodes[1]];
9834-
let (payment_preimage, payment_hash, _, _) = route_payment(&nodes[0], &expected_route, 100_000);
9834+
let (payment_preimage, payment_hash, ..) = route_payment(&nodes[0], &expected_route, 100_000);
98359835

98369836
// Next, attempt a keysend payment and make sure it fails.
98379837
let route_params = RouteParameters::from_payment_params_and_value(

0 commit comments

Comments
 (0)