Skip to content

Commit aef1b57

Browse files
committed
f Rename expect..and_htlc_handling_failed macro
1 parent 28c7484 commit aef1b57

13 files changed

+73
-73
lines changed

lightning/src/ln/chanmon_update_fail_tests.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ fn do_test_monitor_update_fail_raa(test_ignore_second_cs: bool) {
972972

973973
// Fail the payment backwards, failing the monitor update on nodes[1]'s receipt of the RAA
974974
nodes[2].node.fail_htlc_backwards(&payment_hash_1);
975-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
975+
process_htlcs_and_expect_htlc_handling_failed!(
976976
nodes[2],
977977
[HTLCHandlingFailureType::Receive { payment_hash: payment_hash_1 }]
978978
);
@@ -1064,7 +1064,7 @@ fn do_test_monitor_update_fail_raa(test_ignore_second_cs: bool) {
10641064
let (latest_update, _) = get_latest_mon_update_id(&nodes[1], chan_2.2);
10651065
nodes[1].chain_monitor.chain_monitor.force_channel_monitor_updated(chan_2.2, latest_update);
10661066
check_added_monitors!(nodes[1], 0);
1067-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
1067+
process_htlcs_and_expect_htlc_handling_failed!(
10681068
nodes[1],
10691069
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
10701070
);
@@ -1970,7 +1970,7 @@ fn test_monitor_update_on_pending_forwards() {
19701970

19711971
let (_, payment_hash_1, ..) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], 1000000);
19721972
nodes[2].node.fail_htlc_backwards(&payment_hash_1);
1973-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
1973+
process_htlcs_and_expect_htlc_handling_failed!(
19741974
nodes[2],
19751975
[HTLCHandlingFailureType::Receive { payment_hash: payment_hash_1 }]
19761976
);
@@ -1995,7 +1995,7 @@ fn test_monitor_update_on_pending_forwards() {
19951995
commitment_signed_dance!(nodes[1], nodes[2], payment_event.commitment_msg, false);
19961996

19971997
chanmon_cfgs[1].persister.set_update_ret(ChannelMonitorUpdateStatus::InProgress);
1998-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
1998+
process_htlcs_and_expect_htlc_handling_failed!(
19991999
nodes[1],
20002000
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
20012001
);
@@ -2498,7 +2498,7 @@ fn test_fail_htlc_on_broadcast_after_claim() {
24982498
check_closed_broadcast!(nodes[1], true);
24992499
connect_blocks(&nodes[1], ANTI_REORG_DELAY - 1);
25002500
check_added_monitors!(nodes[1], 1);
2501-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2501+
process_htlcs_and_expect_htlc_handling_failed!(
25022502
nodes[1],
25032503
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_id_2 }]
25042504
);
@@ -2884,7 +2884,7 @@ fn do_test_reconnect_dup_htlc_claims(htlc_status: HTLCStatusAtDupClaim, second_f
28842884
msgs::UpdateFulfillHTLC { channel_id: chan_id_2, htlc_id: 0, payment_preimage };
28852885
if second_fails {
28862886
nodes[2].node.fail_htlc_backwards(&payment_hash);
2887-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2887+
process_htlcs_and_expect_htlc_handling_failed!(
28882888
nodes[2],
28892889
[HTLCHandlingFailureType::Receive { payment_hash }]
28902890
);
@@ -2933,7 +2933,7 @@ fn do_test_reconnect_dup_htlc_claims(htlc_status: HTLCStatusAtDupClaim, second_f
29332933
let mut reconnect_args = ReconnectArgs::new(&nodes[1], &nodes[2]);
29342934
reconnect_args.pending_htlc_fails.0 = 1;
29352935
reconnect_nodes(reconnect_args);
2936-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2936+
process_htlcs_and_expect_htlc_handling_failed!(
29372937
nodes[1],
29382938
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_id_2 }]
29392939
);

lightning/src/ln/channelmanager.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16896,7 +16896,7 @@ mod tests {
1689616896
check_added_monitors!(nodes[1], 0);
1689716897
commitment_signed_dance!(nodes[1], nodes[0], payment_event.commitment_msg, false);
1689816898
nodes[1].node.process_pending_htlc_forwards();
16899-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash: our_payment_hash }]);
16899+
process_htlcs_and_expect_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash: our_payment_hash }]);
1690016900
check_added_monitors!(nodes[1], 1);
1690116901
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1690216902
assert!(updates.update_add_htlcs.is_empty());
@@ -17116,7 +17116,7 @@ mod tests {
1711617116
// We have to forward pending HTLCs twice - once tries to forward the payment forward (and
1711717117
// fails), the second will process the resulting failure and fail the HTLC backward
1711817118
nodes[1].node.process_pending_htlc_forwards();
17119-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash }]);
17119+
process_htlcs_and_expect_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash }]);
1712017120
check_added_monitors!(nodes[1], 1);
1712117121
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1712217122
assert!(updates.update_add_htlcs.is_empty());
@@ -17161,7 +17161,7 @@ mod tests {
1716117161
check_added_monitors!(nodes[1], 0);
1716217162
commitment_signed_dance!(nodes[1], nodes[0], payment_event.commitment_msg, false);
1716317163
nodes[1].node.process_pending_htlc_forwards();
17164-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash }]);
17164+
process_htlcs_and_expect_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash }]);
1716517165
check_added_monitors!(nodes[1], 1);
1716617166
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1716717167
assert!(updates.update_add_htlcs.is_empty());
@@ -17208,7 +17208,7 @@ mod tests {
1720817208
check_added_monitors!(nodes[1], 0);
1720917209
commitment_signed_dance!(nodes[1], nodes[0], payment_event.commitment_msg, false);
1721017210
nodes[1].node.process_pending_htlc_forwards();
17211-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash }]);
17211+
process_htlcs_and_expect_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash }]);
1721217212
check_added_monitors!(nodes[1], 1);
1721317213
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1721417214
assert!(updates.update_add_htlcs.is_empty());

lightning/src/ln/functional_test_utils.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2365,7 +2365,7 @@ pub fn expect_pending_htlcs_forwardable_conditions(
23652365

23662366
#[macro_export]
23672367
/// Handles a PendingHTLCsForwardable and HTLCHandlingFailed event
2368-
macro_rules! expect_pending_htlcs_forwardable_and_htlc_handling_failed {
2368+
macro_rules! process_htlcs_and_expect_htlc_handling_failed {
23692369
($node: expr, $expected_failures: expr) => {{
23702370
$crate::ln::functional_test_utils::expect_pending_htlcs_forwardable_conditions(
23712371
$node.node.get_and_clear_pending_events(),
@@ -2525,7 +2525,7 @@ pub fn do_commitment_signed_dance(
25252525
}
25262526

25272527
if fail_backwards {
2528-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2528+
process_htlcs_and_expect_htlc_handling_failed!(
25292529
node_a,
25302530
[crate::events::HTLCHandlingFailureType::Forward {
25312531
node_id: Some(node_b_id),
@@ -3888,7 +3888,7 @@ pub fn fail_payment_along_route<'a, 'b, 'c>(
38883888
repeat(HTLCHandlingFailureType::Receive { payment_hash: our_payment_hash })
38893889
.take(expected_paths.len())
38903890
.collect();
3891-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
3891+
process_htlcs_and_expect_htlc_handling_failed!(
38923892
expected_paths[0].last().unwrap(),
38933893
expected_destinations
38943894
);
@@ -3970,7 +3970,7 @@ pub fn pass_failed_payment_back<'a, 'b, 'c>(
39703970
update_next_node
39713971
);
39723972
if !update_next_node {
3973-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
3973+
process_htlcs_and_expect_htlc_handling_failed!(
39743974
node,
39753975
[HTLCHandlingFailureType::Forward {
39763976
node_id: Some(prev_node.node.get_our_node_id()),

lightning/src/ln/functional_tests.rs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ fn do_test_fail_back_before_backwards_timeout(post_fail_back_action: PostFailBac
871871
connect_blocks(&nodes[0], timeout_blocks + upstream_timeout_blocks);
872872

873873
// Check that nodes[1] fails the HTLC upstream
874-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
874+
process_htlcs_and_expect_htlc_handling_failed!(
875875
nodes[1],
876876
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
877877
);
@@ -892,7 +892,7 @@ fn do_test_fail_back_before_backwards_timeout(post_fail_back_action: PostFailBac
892892
mine_transaction(&nodes[1], &node_1_txn[1]); // HTLC timeout
893893
connect_blocks(&nodes[1], ANTI_REORG_DELAY);
894894
// Expect handling another fail back event, but the HTLC is already gone
895-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
895+
process_htlcs_and_expect_htlc_handling_failed!(
896896
nodes[1],
897897
[HTLCHandlingFailureType::Forward {
898898
node_id: Some(node_c_id),
@@ -921,7 +921,7 @@ fn do_test_fail_back_before_backwards_timeout(post_fail_back_action: PostFailBac
921921
},
922922
PostFailBackAction::FailOffChain => {
923923
nodes[2].node.fail_htlc_backwards(&payment_hash);
924-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
924+
process_htlcs_and_expect_htlc_handling_failed!(
925925
nodes[2],
926926
[HTLCHandlingFailureType::Receive { payment_hash }]
927927
);
@@ -2102,7 +2102,7 @@ fn do_test_htlc_on_chain_timeout(connect_style: ConnectStyle) {
21022102
check_spends!(commitment_tx[0], chan_2.3);
21032103
nodes[2].node.fail_htlc_backwards(&payment_hash);
21042104
check_added_monitors(&nodes[2], 0);
2105-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2105+
process_htlcs_and_expect_htlc_handling_failed!(
21062106
nodes[2],
21072107
[HTLCHandlingFailureType::Receive { payment_hash: payment_hash.clone() }]
21082108
);
@@ -2179,7 +2179,7 @@ fn do_test_htlc_on_chain_timeout(connect_style: ConnectStyle) {
21792179

21802180
connect_blocks(&nodes[1], ANTI_REORG_DELAY - 1);
21812181

2182-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2182+
process_htlcs_and_expect_htlc_handling_failed!(
21832183
nodes[1],
21842184
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
21852185
);
@@ -2267,7 +2267,7 @@ pub fn test_simple_commitment_revoked_fail_backward() {
22672267
check_added_monitors(&nodes[1], 1);
22682268
check_closed_broadcast!(nodes[1], true);
22692269

2270-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2270+
process_htlcs_and_expect_htlc_handling_failed!(
22712271
nodes[1],
22722272
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
22732273
);
@@ -2360,7 +2360,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(
23602360
let (_, third_payment_hash, ..) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], value);
23612361

23622362
nodes[2].node.fail_htlc_backwards(&first_payment_hash);
2363-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2363+
process_htlcs_and_expect_htlc_handling_failed!(
23642364
nodes[2],
23652365
[HTLCHandlingFailureType::Receive { payment_hash: first_payment_hash }]
23662366
);
@@ -2377,7 +2377,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(
23772377
// Drop the last RAA from 3 -> 2
23782378

23792379
nodes[2].node.fail_htlc_backwards(&second_payment_hash);
2380-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2380+
process_htlcs_and_expect_htlc_handling_failed!(
23812381
nodes[2],
23822382
[HTLCHandlingFailureType::Receive { payment_hash: second_payment_hash }]
23832383
);
@@ -2397,7 +2397,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(
23972397
check_added_monitors(&nodes[2], 1);
23982398

23992399
nodes[2].node.fail_htlc_backwards(&third_payment_hash);
2400-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2400+
process_htlcs_and_expect_htlc_handling_failed!(
24012401
nodes[2],
24022402
[HTLCHandlingFailureType::Receive { payment_hash: third_payment_hash }]
24032403
);
@@ -3706,7 +3706,7 @@ fn do_test_htlc_timeout(send_partial_mpp: bool) {
37063706
connect_block(&nodes[1], &block);
37073707
}
37083708

3709-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
3709+
process_htlcs_and_expect_htlc_handling_failed!(
37103710
nodes[1],
37113711
[HTLCHandlingFailureType::Receive { payment_hash: our_payment_hash }]
37123712
);
@@ -3787,7 +3787,7 @@ fn do_test_holding_cell_htlc_add_timeouts(forwarded_htlc: bool) {
37873787
if forwarded_htlc {
37883788
let fail_type =
37893789
HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 };
3790-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], [fail_type]);
3790+
process_htlcs_and_expect_htlc_handling_failed!(nodes[1], [fail_type]);
37913791
check_added_monitors(&nodes[1], 1);
37923792
let fail_commit = nodes[1].node.get_and_clear_pending_msg_events();
37933793
assert_eq!(fail_commit.len(), 1);
@@ -4570,7 +4570,7 @@ pub fn test_duplicate_payment_hash_one_failure_one_success() {
45704570
// Mine the HTLC timeout transaction on node B.
45714571
mine_transaction(&nodes[1], &htlc_timeout_tx);
45724572
connect_blocks(&nodes[1], ANTI_REORG_DELAY - 1);
4573-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
4573+
process_htlcs_and_expect_htlc_handling_failed!(
45744574
nodes[1],
45754575
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
45764576
);
@@ -4793,7 +4793,7 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
47934793
HTLCHandlingFailureType::Receive { payment_hash: hash_5 },
47944794
HTLCHandlingFailureType::Receive { payment_hash: hash_6 },
47954795
];
4796-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[4], failed_destinations);
4796+
process_htlcs_and_expect_htlc_handling_failed!(nodes[4], failed_destinations);
47974797
check_added_monitors(&nodes[4], 1);
47984798

47994799
let four_removes = get_htlc_update_msgs!(nodes[4], node_d_id);
@@ -4812,7 +4812,7 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
48124812
HTLCHandlingFailureType::Receive { payment_hash: hash_2 },
48134813
HTLCHandlingFailureType::Receive { payment_hash: hash_4 },
48144814
];
4815-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[5], failed_destinations_2);
4815+
process_htlcs_and_expect_htlc_handling_failed!(nodes[5], failed_destinations_2);
48164816
check_added_monitors(&nodes[5], 1);
48174817

48184818
let two_removes = get_htlc_update_msgs!(nodes[5], node_d_id);
@@ -4831,7 +4831,7 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
48314831
HTLCHandlingFailureType::Forward { node_id: Some(node_f_id), channel_id: chan_3_5.2 },
48324832
HTLCHandlingFailureType::Forward { node_id: Some(node_f_id), channel_id: chan_3_5.2 },
48334833
];
4834-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[3], failed_destinations_3);
4834+
process_htlcs_and_expect_htlc_handling_failed!(nodes[3], failed_destinations_3);
48354835
check_added_monitors(&nodes[3], 1);
48364836
let six_removes = get_htlc_update_msgs!(nodes[3], node_c_id);
48374837
nodes[2].node.handle_update_fail_htlc(node_d_id, &six_removes.update_fail_htlcs[0]);
@@ -4911,7 +4911,7 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
49114911
.collect()
49124912
};
49134913

4914-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[2], expected_destinations);
4914+
process_htlcs_and_expect_htlc_handling_failed!(nodes[2], expected_destinations);
49154915
}
49164916
check_added_monitors(&nodes[2], 3);
49174917

@@ -5392,7 +5392,7 @@ fn do_htlc_claim_previous_remote_commitment_only(use_dust: bool, check_revoke_no
53925392
let htlc_value = if use_dust { 50000 } else { 3000000 };
53935393
let (_, our_payment_hash, ..) = route_payment(&nodes[0], &[&nodes[1]], htlc_value);
53945394
nodes[1].node.fail_htlc_backwards(&our_payment_hash);
5395-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
5395+
process_htlcs_and_expect_htlc_handling_failed!(
53965396
nodes[1],
53975397
[HTLCHandlingFailureType::Receive { payment_hash: our_payment_hash }]
53985398
);
@@ -6029,7 +6029,7 @@ pub fn test_update_fulfill_htlc_bolt2_after_malformed_htlc_message_must_forward_
60296029

60306030
check_added_monitors(&nodes[1], 0);
60316031
commitment_signed_dance!(nodes[1], nodes[2], update_msg.1, false, true);
6032-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
6032+
process_htlcs_and_expect_htlc_handling_failed!(
60336033
nodes[1],
60346034
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
60356035
);
@@ -6121,7 +6121,7 @@ pub fn test_channel_failed_after_message_with_badonion_node_perm_bits_set() {
61216121
_ => panic!("Unexpected event"),
61226122
}
61236123

6124-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
6124+
process_htlcs_and_expect_htlc_handling_failed!(
61256125
nodes[1],
61266126
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
61276127
);
@@ -6203,7 +6203,7 @@ fn do_test_failure_delay_dust_htlc_local_commitment(announce_latest: bool) {
62036203
// Fail one HTLC to prune it in the will-be-latest-local commitment tx
62046204
nodes[1].node.fail_htlc_backwards(&payment_hash_2);
62056205
check_added_monitors(&nodes[1], 0);
6206-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
6206+
process_htlcs_and_expect_htlc_handling_failed!(
62076207
nodes[1],
62086208
[HTLCHandlingFailureType::Receive { payment_hash: payment_hash_2 }]
62096209
);
@@ -6569,7 +6569,7 @@ pub fn test_check_htlc_underpaying() {
65696569
// Note that we first have to wait a random delay before processing the receipt of the HTLC,
65706570
// and then will wait a second random delay before failing the HTLC back:
65716571
nodes[1].node.process_pending_htlc_forwards();
6572-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
6572+
process_htlcs_and_expect_htlc_handling_failed!(
65736573
nodes[1],
65746574
[HTLCHandlingFailureType::Receive { payment_hash: our_payment_hash }]
65756575
);
@@ -8001,7 +8001,7 @@ pub fn test_bad_secret_hash() {
80018001
// We have to forward pending HTLCs once to process the receipt of the HTLC and then
80028002
// again to process the pending backwards-failure of the HTLC
80038003
nodes[1].node.process_pending_htlc_forwards();
8004-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
8004+
process_htlcs_and_expect_htlc_handling_failed!(
80058005
nodes[1],
80068006
vec![HTLCHandlingFailureType::Receive { payment_hash: $payment_hash }]
80078007
);
@@ -9416,7 +9416,7 @@ fn do_test_tx_confirmed_skipping_blocks_immediate_broadcast(test_height_before_t
94169416
&[(0, htlc_tx)],
94179417
conf_height + 1,
94189418
);
9419-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
9419+
process_htlcs_and_expect_htlc_handling_failed!(
94209420
nodes[1],
94219421
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id }]
94229422
);
@@ -9446,7 +9446,7 @@ fn do_test_tx_confirmed_skipping_blocks_immediate_broadcast(test_height_before_t
94469446
// When the HTLC times out on the A<->B edge, the B<->C channel will fail the HTLC back to
94479447
// avoid the A<->B channel closing (even though it already has). This will generate a
94489448
// spurious HTLCHandlingFailed event.
9449-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
9449+
process_htlcs_and_expect_htlc_handling_failed!(
94509450
nodes[1],
94519451
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id }]
94529452
);
@@ -9699,7 +9699,7 @@ pub fn test_inconsistent_mpp_params() {
96999699
nodes[2].node.handle_update_fail_htlc(node_d_id, &fail_updates_1.update_fail_htlcs[0]);
97009700
commitment_signed_dance!(nodes[2], nodes[3], fail_updates_1.commitment_signed, false);
97019701

9702-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
9702+
process_htlcs_and_expect_htlc_handling_failed!(
97039703
nodes[2],
97049704
[HTLCHandlingFailureType::Forward { node_id: Some(node_d_id), channel_id: chan_2_3.2 }]
97059705
);
@@ -9774,7 +9774,7 @@ pub fn test_double_partial_claim() {
97749774
HTLCHandlingFailureType::Receive { payment_hash: hash },
97759775
HTLCHandlingFailureType::Receive { payment_hash: hash },
97769776
];
9777-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[3], failed_destinations);
9777+
process_htlcs_and_expect_htlc_handling_failed!(nodes[3], failed_destinations);
97789778

97799779
let reason = PaymentFailureReason::RecipientRejected;
97809780
pass_failed_payment_back(&nodes[0], paths, false, hash, reason);
@@ -10759,7 +10759,7 @@ fn do_payment_with_custom_min_final_cltv_expiry(valid_delta: bool, use_user_hash
1075910759
claim_payment(&nodes[0], &[&nodes[1]], payment_preimage);
1076010760
} else {
1076110761
let fail_type = HTLCHandlingFailureType::Receive { payment_hash: hash };
10762-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], [fail_type]);
10762+
process_htlcs_and_expect_htlc_handling_failed!(nodes[1], [fail_type]);
1076310763

1076410764
check_added_monitors(&nodes[1], 1);
1076510765

lightning/src/ln/htlc_reserve_unit_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ pub fn holding_cell_htlc_counting() {
676676
// fails), the second will process the resulting failure and fail the HTLC backward.
677677
nodes[1].node.process_pending_htlc_forwards();
678678
let fail = HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 };
679-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], [fail]);
679+
process_htlcs_and_expect_htlc_handling_failed!(nodes[1], [fail]);
680680
check_added_monitors(&nodes[1], 1);
681681

682682
let bs_fail_updates = get_htlc_update_msgs!(nodes[1], node_a_id);

0 commit comments

Comments
 (0)