Skip to content

Commit 2a54b74

Browse files
committed
more ..
1 parent f23b75a commit 2a54b74

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

lightning/src/ln/functional_tests.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,7 +1552,7 @@ fn test_chan_reserve_violation_outbound_htlc_inbound_chan() {
15521552
let (route, our_payment_hash, _, our_payment_secret) = get_route_and_payment_hash!(nodes[1], nodes[0], 1_000_000);
15531553
// Sending exactly enough to hit the reserve amount should be accepted
15541554
for _ in 0..MIN_AFFORDABLE_HTLC_COUNT {
1555-
let (_, _, ..) = route_payment(&nodes[1], &[&nodes[0]], 1_000_000);
1555+
route_payment(&nodes[1], &[&nodes[0]], 1_000_000);
15561556
}
15571557

15581558
// However one more HTLC should be significantly over the reserve amount and fail.
@@ -1582,7 +1582,7 @@ fn test_chan_reserve_violation_inbound_htlc_outbound_channel() {
15821582

15831583
// Send four HTLCs to cover the initial push_msat buffer we're required to include
15841584
for _ in 0..MIN_AFFORDABLE_HTLC_COUNT {
1585-
let (_, _, ..) = route_payment(&nodes[1], &[&nodes[0]], 1_000_000);
1585+
route_payment(&nodes[1], &[&nodes[0]], 1_000_000);
15861586
}
15871587

15881588
let (mut route, payment_hash, _, payment_secret) =
@@ -1643,11 +1643,11 @@ fn test_chan_reserve_dust_inbound_htlcs_outbound_chan() {
16431643
// In the previous code, routing this dust payment would cause nodes[0] to perceive a channel
16441644
// reserve violation even though it's a dust HTLC and therefore shouldn't count towards the
16451645
// commitment transaction fee.
1646-
let (_, _, ..) = route_payment(&nodes[1], &[&nodes[0]], dust_amt);
1646+
route_payment(&nodes[1], &[&nodes[0]], dust_amt);
16471647

16481648
// Send four HTLCs to cover the initial push_msat buffer we're required to include
16491649
for _ in 0..MIN_AFFORDABLE_HTLC_COUNT {
1650-
let (_, _, ..) = route_payment(&nodes[1], &[&nodes[0]], 1_000_000);
1650+
route_payment(&nodes[1], &[&nodes[0]], 1_000_000);
16511651
}
16521652

16531653
// One more than the dust amt should fail, however.
@@ -1708,22 +1708,22 @@ fn test_chan_reserve_dust_inbound_htlcs_inbound_chan() {
17081708

17091709
let payment_amt = 46000; // Dust amount
17101710
// In the previous code, these first four payments would succeed.
1711-
let (_, _, ..) = route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1712-
let (_, _, ..) = route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1713-
let (_, _, ..) = route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1714-
let (_, _, ..) = route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1711+
route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1712+
route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1713+
route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1714+
route_payment(&nodes[0], &[&nodes[1]], payment_amt);
17151715

17161716
// Then these next 5 would be interpreted by nodes[1] as violating the fee spike buffer.
1717-
let (_, _, ..) = route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1718-
let (_, _, ..) = route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1719-
let (_, _, ..) = route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1720-
let (_, _, ..) = route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1721-
let (_, _, ..) = route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1717+
route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1718+
route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1719+
route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1720+
route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1721+
route_payment(&nodes[0], &[&nodes[1]], payment_amt);
17221722

17231723
// And this last payment previously resulted in nodes[1] closing on its inbound-channel
17241724
// counterparty, because it counted all the previous dust HTLCs against nodes[0]'s commitment
17251725
// transaction fee and therefore perceived this next payment as a channel reserve violation.
1726-
let (_, _, ..) = route_payment(&nodes[0], &[&nodes[1]], payment_amt);
1726+
route_payment(&nodes[0], &[&nodes[1]], payment_amt);
17271727
}
17281728

17291729
#[test]
@@ -7007,7 +7007,7 @@ fn do_test_sweep_outbound_htlc_failure_update(revoked: bool, local: bool) {
70077007

70087008
// We revoked bs_commitment_tx
70097009
if revoked {
7010-
let (payment_preimage_3, _, ..) = route_payment(&nodes[0], &[&nodes[1]], 1000000);
7010+
let (payment_preimage_3, ..) = route_payment(&nodes[0], &[&nodes[1]], 1000000);
70117011
claim_payment(&nodes[0], &vec!(&nodes[1])[..], payment_preimage_3);
70127012
}
70137013

@@ -7721,7 +7721,7 @@ fn test_bump_txn_sanitize_tracking_maps() {
77217721

77227722
let chan = create_announced_chan_between_nodes_with_value(&nodes, 0, 1, 1000000, 59000000);
77237723
// Lock HTLC in both directions
7724-
let (payment_preimage_1, _, ..) = route_payment(&nodes[0], &vec!(&nodes[1])[..], 9_000_000);
7724+
let (payment_preimage_1, ..) = route_payment(&nodes[0], &vec!(&nodes[1])[..], 9_000_000);
77257725
let (_, payment_hash_2, ..) = route_payment(&nodes[1], &vec!(&nodes[0])[..], 9_000_000);
77267726

77277727
let revoked_local_txn = get_local_commitment_txn!(nodes[1], chan.2);

lightning/src/ln/reload_tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ fn test_simple_manager_serialize_deserialize() {
332332
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
333333
let chan_id = create_announced_chan_between_nodes(&nodes, 0, 1).2;
334334

335-
let (our_payment_preimage, _, ..) = route_payment(&nodes[0], &[&nodes[1]], 1000000);
335+
let (our_payment_preimage, ..) = route_payment(&nodes[0], &[&nodes[1]], 1000000);
336336
let (_, our_payment_hash, ..) = route_payment(&nodes[0], &[&nodes[1]], 1000000);
337337

338338
nodes[1].node.peer_disconnected(&nodes[0].node.get_our_node_id());
@@ -371,7 +371,7 @@ fn test_manager_serialize_deserialize_inconsistent_monitor() {
371371
node_0_stale_monitors_serialized.push(writer.0);
372372
}
373373

374-
let (our_payment_preimage, _, ..) = route_payment(&nodes[2], &[&nodes[0], &nodes[1]], 1000000);
374+
let (our_payment_preimage, ..) = route_payment(&nodes[2], &[&nodes[0], &nodes[1]], 1000000);
375375

376376
// Serialize the ChannelManager here, but the monitor we keep up-to-date
377377
let nodes_0_serialized = nodes[0].node.encode();

lightning/src/ln/reorg_tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn do_test_onchain_htlc_reorg(local_commitment: bool, claim: bool) {
5555
connect_blocks(&nodes[1], 2*CHAN_CONFIRM_DEPTH + 1 - nodes[1].best_block_info().1);
5656
connect_blocks(&nodes[2], 2*CHAN_CONFIRM_DEPTH + 1 - nodes[2].best_block_info().1);
5757

58-
let (our_payment_preimage, our_payment_hash, _, ..) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], 1_000_000);
58+
let (our_payment_preimage, our_payment_hash, ..) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], 1_000_000);
5959

6060
// Provide preimage to node 2 by claiming payment
6161
nodes[2].node.claim_funds(our_payment_preimage);
@@ -423,8 +423,8 @@ fn test_set_outpoints_partial_claiming() {
423423
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
424424

425425
let chan = create_announced_chan_between_nodes_with_value(&nodes, 0, 1, 1000000, 59000000);
426-
let (payment_preimage_1, payment_hash_1, _, ..) = route_payment(&nodes[1], &[&nodes[0]], 3_000_000);
427-
let (payment_preimage_2, payment_hash_2, _, ..) = route_payment(&nodes[1], &[&nodes[0]], 3_000_000);
426+
let (payment_preimage_1, payment_hash_1, ..) = route_payment(&nodes[1], &[&nodes[0]], 3_000_000);
427+
let (payment_preimage_2, payment_hash_2, ..) = route_payment(&nodes[1], &[&nodes[0]], 3_000_000);
428428

429429
// Remote commitment txn with 4 outputs: to_local, to_remote, 2 outgoing HTLC
430430
let remote_txn = get_local_commitment_txn!(nodes[1], chan.2);

lightning/src/ln/shutdown_tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ fn expect_channel_shutdown_state_with_htlc() {
122122
let chan_1 = create_announced_chan_between_nodes(&nodes, 0, 1);
123123
let _chan_2 = create_announced_chan_between_nodes(&nodes, 1, 2);
124124

125-
let (payment_preimage_0, payment_hash_0, _, ..) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], 100_000);
125+
let (payment_preimage_0, payment_hash_0, ..) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], 100_000);
126126

127127
expect_channel_shutdown_state!(nodes[0], chan_1.2, ChannelShutdownState::NotShuttingDown);
128128
expect_channel_shutdown_state!(nodes[1], chan_1.2, ChannelShutdownState::NotShuttingDown);
@@ -209,7 +209,7 @@ fn test_lnd_bug_6039() {
209209
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
210210
let chan = create_announced_chan_between_nodes(&nodes, 0, 1);
211211

212-
let (payment_preimage, payment_hash, _, ..) = route_payment(&nodes[0], &[&nodes[1]], 100_000);
212+
let (payment_preimage, payment_hash, ..) = route_payment(&nodes[0], &[&nodes[1]], 100_000);
213213

214214
nodes[0].node.close_channel(&chan.2, &nodes[1].node.get_our_node_id()).unwrap();
215215
let node_0_shutdown = get_event_msg!(nodes[0], MessageSendEvent::SendShutdown, nodes[1].node.get_our_node_id());
@@ -299,7 +299,7 @@ fn updates_shutdown_wait() {
299299
let keys_manager = test_utils::TestKeysInterface::new(&[0u8; 32], Network::Testnet);
300300
let random_seed_bytes = keys_manager.get_secure_random_bytes();
301301

302-
let (payment_preimage_0, payment_hash_0, _, ..) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], 100_000);
302+
let (payment_preimage_0, payment_hash_0, ..) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], 100_000);
303303

304304
nodes[0].node.close_channel(&chan_1.2, &nodes[1].node.get_our_node_id()).unwrap();
305305
let node_0_shutdown = get_event_msg!(nodes[0], MessageSendEvent::SendShutdown, nodes[1].node.get_our_node_id());
@@ -460,7 +460,7 @@ fn do_test_shutdown_rebroadcast(recv_count: u8) {
460460
let chan_1 = create_announced_chan_between_nodes(&nodes, 0, 1);
461461
let chan_2 = create_announced_chan_between_nodes(&nodes, 1, 2);
462462

463-
let (payment_preimage, payment_hash, _, ..) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], 100_000);
463+
let (payment_preimage, payment_hash, ..) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], 100_000);
464464

465465
nodes[1].node.close_channel(&chan_1.2, &nodes[0].node.get_our_node_id()).unwrap();
466466
let node_1_shutdown = get_event_msg!(nodes[1], MessageSendEvent::SendShutdown, nodes[0].node.get_our_node_id());

0 commit comments

Comments
 (0)