Skip to content

Commit be5cdc1

Browse files
committed
f Rename expect..and_htlc_handling_failed macro
1 parent 7233f7d commit be5cdc1

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
@@ -975,7 +975,7 @@ fn do_test_monitor_update_fail_raa(test_ignore_second_cs: bool) {
975975

976976
// Fail the payment backwards, failing the monitor update on nodes[1]'s receipt of the RAA
977977
nodes[2].node.fail_htlc_backwards(&payment_hash_1);
978-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
978+
process_htlcs_and_expect_htlc_handling_failed!(
979979
nodes[2],
980980
[HTLCHandlingFailureType::Receive { payment_hash: payment_hash_1 }]
981981
);
@@ -1067,7 +1067,7 @@ fn do_test_monitor_update_fail_raa(test_ignore_second_cs: bool) {
10671067
let (latest_update, _) = get_latest_mon_update_id(&nodes[1], chan_2.2);
10681068
nodes[1].chain_monitor.chain_monitor.force_channel_monitor_updated(chan_2.2, latest_update);
10691069
check_added_monitors!(nodes[1], 0);
1070-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
1070+
process_htlcs_and_expect_htlc_handling_failed!(
10711071
nodes[1],
10721072
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
10731073
);
@@ -1973,7 +1973,7 @@ fn test_monitor_update_on_pending_forwards() {
19731973

19741974
let (_, payment_hash_1, ..) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], 1000000);
19751975
nodes[2].node.fail_htlc_backwards(&payment_hash_1);
1976-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
1976+
process_htlcs_and_expect_htlc_handling_failed!(
19771977
nodes[2],
19781978
[HTLCHandlingFailureType::Receive { payment_hash: payment_hash_1 }]
19791979
);
@@ -1998,7 +1998,7 @@ fn test_monitor_update_on_pending_forwards() {
19981998
commitment_signed_dance!(nodes[1], nodes[2], payment_event.commitment_msg, false);
19991999

20002000
chanmon_cfgs[1].persister.set_update_ret(ChannelMonitorUpdateStatus::InProgress);
2001-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2001+
process_htlcs_and_expect_htlc_handling_failed!(
20022002
nodes[1],
20032003
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
20042004
);
@@ -2501,7 +2501,7 @@ fn test_fail_htlc_on_broadcast_after_claim() {
25012501
check_closed_broadcast!(nodes[1], true);
25022502
connect_blocks(&nodes[1], ANTI_REORG_DELAY - 1);
25032503
check_added_monitors!(nodes[1], 1);
2504-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2504+
process_htlcs_and_expect_htlc_handling_failed!(
25052505
nodes[1],
25062506
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_id_2 }]
25072507
);
@@ -2887,7 +2887,7 @@ fn do_test_reconnect_dup_htlc_claims(htlc_status: HTLCStatusAtDupClaim, second_f
28872887
msgs::UpdateFulfillHTLC { channel_id: chan_id_2, htlc_id: 0, payment_preimage };
28882888
if second_fails {
28892889
nodes[2].node.fail_htlc_backwards(&payment_hash);
2890-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2890+
process_htlcs_and_expect_htlc_handling_failed!(
28912891
nodes[2],
28922892
[HTLCHandlingFailureType::Receive { payment_hash }]
28932893
);
@@ -2936,7 +2936,7 @@ fn do_test_reconnect_dup_htlc_claims(htlc_status: HTLCStatusAtDupClaim, second_f
29362936
let mut reconnect_args = ReconnectArgs::new(&nodes[1], &nodes[2]);
29372937
reconnect_args.pending_htlc_fails.0 = 1;
29382938
reconnect_nodes(reconnect_args);
2939-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2939+
process_htlcs_and_expect_htlc_handling_failed!(
29402940
nodes[1],
29412941
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_id_2 }]
29422942
);

lightning/src/ln/channelmanager.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16763,7 +16763,7 @@ mod tests {
1676316763
check_added_monitors!(nodes[1], 0);
1676416764
commitment_signed_dance!(nodes[1], nodes[0], payment_event.commitment_msg, false);
1676516765
nodes[1].node.process_pending_htlc_forwards();
16766-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash: our_payment_hash }]);
16766+
process_htlcs_and_expect_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash: our_payment_hash }]);
1676716767
check_added_monitors!(nodes[1], 1);
1676816768
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1676916769
assert!(updates.update_add_htlcs.is_empty());
@@ -16983,7 +16983,7 @@ mod tests {
1698316983
// We have to forward pending HTLCs twice - once tries to forward the payment forward (and
1698416984
// fails), the second will process the resulting failure and fail the HTLC backward
1698516985
nodes[1].node.process_pending_htlc_forwards();
16986-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash }]);
16986+
process_htlcs_and_expect_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash }]);
1698716987
check_added_monitors!(nodes[1], 1);
1698816988
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1698916989
assert!(updates.update_add_htlcs.is_empty());
@@ -17028,7 +17028,7 @@ mod tests {
1702817028
check_added_monitors!(nodes[1], 0);
1702917029
commitment_signed_dance!(nodes[1], nodes[0], payment_event.commitment_msg, false);
1703017030
nodes[1].node.process_pending_htlc_forwards();
17031-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash }]);
17031+
process_htlcs_and_expect_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash }]);
1703217032
check_added_monitors!(nodes[1], 1);
1703317033
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1703417034
assert!(updates.update_add_htlcs.is_empty());
@@ -17075,7 +17075,7 @@ mod tests {
1707517075
check_added_monitors!(nodes[1], 0);
1707617076
commitment_signed_dance!(nodes[1], nodes[0], payment_event.commitment_msg, false);
1707717077
nodes[1].node.process_pending_htlc_forwards();
17078-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash }]);
17078+
process_htlcs_and_expect_htlc_handling_failed!(nodes[1], [HTLCHandlingFailureType::Receive { payment_hash }]);
1707917079
check_added_monitors!(nodes[1], 1);
1708017080
let updates = get_htlc_update_msgs!(nodes[1], nodes[0].node.get_our_node_id());
1708117081
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
@@ -2387,7 +2387,7 @@ pub fn expect_pending_htlcs_forwardable_conditions(
23872387

23882388
#[macro_export]
23892389
/// Handles a PendingHTLCsForwardable and HTLCHandlingFailed event
2390-
macro_rules! expect_pending_htlcs_forwardable_and_htlc_handling_failed {
2390+
macro_rules! process_htlcs_and_expect_htlc_handling_failed {
23912391
($node: expr, $expected_failures: expr) => {{
23922392
$crate::ln::functional_test_utils::expect_pending_htlcs_forwardable_conditions(
23932393
$node.node.get_and_clear_pending_events(),
@@ -2547,7 +2547,7 @@ pub fn do_commitment_signed_dance(
25472547
}
25482548

25492549
if fail_backwards {
2550-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2550+
process_htlcs_and_expect_htlc_handling_failed!(
25512551
node_a,
25522552
[crate::events::HTLCHandlingFailureType::Forward {
25532553
node_id: Some(node_b_id),
@@ -3910,7 +3910,7 @@ pub fn fail_payment_along_route<'a, 'b, 'c>(
39103910
repeat(HTLCHandlingFailureType::Receive { payment_hash: our_payment_hash })
39113911
.take(expected_paths.len())
39123912
.collect();
3913-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
3913+
process_htlcs_and_expect_htlc_handling_failed!(
39143914
expected_paths[0].last().unwrap(),
39153915
expected_destinations
39163916
);
@@ -3992,7 +3992,7 @@ pub fn pass_failed_payment_back<'a, 'b, 'c>(
39923992
update_next_node
39933993
);
39943994
if !update_next_node {
3995-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
3995+
process_htlcs_and_expect_htlc_handling_failed!(
39963996
node,
39973997
[HTLCHandlingFailureType::Forward {
39983998
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
);
@@ -2084,7 +2084,7 @@ fn do_test_htlc_on_chain_timeout(connect_style: ConnectStyle) {
20842084
check_spends!(commitment_tx[0], chan_2.3);
20852085
nodes[2].node.fail_htlc_backwards(&payment_hash);
20862086
check_added_monitors(&nodes[2], 0);
2087-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2087+
process_htlcs_and_expect_htlc_handling_failed!(
20882088
nodes[2],
20892089
[HTLCHandlingFailureType::Receive { payment_hash: payment_hash.clone() }]
20902090
);
@@ -2161,7 +2161,7 @@ fn do_test_htlc_on_chain_timeout(connect_style: ConnectStyle) {
21612161

21622162
connect_blocks(&nodes[1], ANTI_REORG_DELAY - 1);
21632163

2164-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2164+
process_htlcs_and_expect_htlc_handling_failed!(
21652165
nodes[1],
21662166
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
21672167
);
@@ -2249,7 +2249,7 @@ pub fn test_simple_commitment_revoked_fail_backward() {
22492249
check_added_monitors(&nodes[1], 1);
22502250
check_closed_broadcast!(nodes[1], true);
22512251

2252-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2252+
process_htlcs_and_expect_htlc_handling_failed!(
22532253
nodes[1],
22542254
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
22552255
);
@@ -2342,7 +2342,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(
23422342
let (_, third_payment_hash, ..) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], value);
23432343

23442344
nodes[2].node.fail_htlc_backwards(&first_payment_hash);
2345-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2345+
process_htlcs_and_expect_htlc_handling_failed!(
23462346
nodes[2],
23472347
[HTLCHandlingFailureType::Receive { payment_hash: first_payment_hash }]
23482348
);
@@ -2359,7 +2359,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(
23592359
// Drop the last RAA from 3 -> 2
23602360

23612361
nodes[2].node.fail_htlc_backwards(&second_payment_hash);
2362-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2362+
process_htlcs_and_expect_htlc_handling_failed!(
23632363
nodes[2],
23642364
[HTLCHandlingFailureType::Receive { payment_hash: second_payment_hash }]
23652365
);
@@ -2379,7 +2379,7 @@ fn do_test_commitment_revoked_fail_backward_exhaustive(
23792379
check_added_monitors(&nodes[2], 1);
23802380

23812381
nodes[2].node.fail_htlc_backwards(&third_payment_hash);
2382-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
2382+
process_htlcs_and_expect_htlc_handling_failed!(
23832383
nodes[2],
23842384
[HTLCHandlingFailureType::Receive { payment_hash: third_payment_hash }]
23852385
);
@@ -3685,7 +3685,7 @@ fn do_test_htlc_timeout(send_partial_mpp: bool) {
36853685
connect_block(&nodes[1], &block);
36863686
}
36873687

3688-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
3688+
process_htlcs_and_expect_htlc_handling_failed!(
36893689
nodes[1],
36903690
[HTLCHandlingFailureType::Receive { payment_hash: our_payment_hash }]
36913691
);
@@ -3766,7 +3766,7 @@ fn do_test_holding_cell_htlc_add_timeouts(forwarded_htlc: bool) {
37663766
if forwarded_htlc {
37673767
let fail_type =
37683768
HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 };
3769-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], [fail_type]);
3769+
process_htlcs_and_expect_htlc_handling_failed!(nodes[1], [fail_type]);
37703770
check_added_monitors(&nodes[1], 1);
37713771
let fail_commit = nodes[1].node.get_and_clear_pending_msg_events();
37723772
assert_eq!(fail_commit.len(), 1);
@@ -4555,7 +4555,7 @@ pub fn test_duplicate_payment_hash_one_failure_one_success() {
45554555
// Mine the HTLC timeout transaction on node B.
45564556
mine_transaction(&nodes[1], &htlc_timeout_tx);
45574557
connect_blocks(&nodes[1], ANTI_REORG_DELAY - 1);
4558-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
4558+
process_htlcs_and_expect_htlc_handling_failed!(
45594559
nodes[1],
45604560
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
45614561
);
@@ -4778,7 +4778,7 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
47784778
HTLCHandlingFailureType::Receive { payment_hash: hash_5 },
47794779
HTLCHandlingFailureType::Receive { payment_hash: hash_6 },
47804780
];
4781-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[4], failed_destinations);
4781+
process_htlcs_and_expect_htlc_handling_failed!(nodes[4], failed_destinations);
47824782
check_added_monitors(&nodes[4], 1);
47834783

47844784
let four_removes = get_htlc_update_msgs!(nodes[4], node_d_id);
@@ -4797,7 +4797,7 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
47974797
HTLCHandlingFailureType::Receive { payment_hash: hash_2 },
47984798
HTLCHandlingFailureType::Receive { payment_hash: hash_4 },
47994799
];
4800-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[5], failed_destinations_2);
4800+
process_htlcs_and_expect_htlc_handling_failed!(nodes[5], failed_destinations_2);
48014801
check_added_monitors(&nodes[5], 1);
48024802

48034803
let two_removes = get_htlc_update_msgs!(nodes[5], node_d_id);
@@ -4816,7 +4816,7 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
48164816
HTLCHandlingFailureType::Forward { node_id: Some(node_f_id), channel_id: chan_3_5.2 },
48174817
HTLCHandlingFailureType::Forward { node_id: Some(node_f_id), channel_id: chan_3_5.2 },
48184818
];
4819-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[3], failed_destinations_3);
4819+
process_htlcs_and_expect_htlc_handling_failed!(nodes[3], failed_destinations_3);
48204820
check_added_monitors(&nodes[3], 1);
48214821
let six_removes = get_htlc_update_msgs!(nodes[3], node_c_id);
48224822
nodes[2].node.handle_update_fail_htlc(node_d_id, &six_removes.update_fail_htlcs[0]);
@@ -4896,7 +4896,7 @@ fn do_test_fail_backwards_unrevoked_remote_announce(deliver_last_raa: bool, anno
48964896
.collect()
48974897
};
48984898

4899-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[2], expected_destinations);
4899+
process_htlcs_and_expect_htlc_handling_failed!(nodes[2], expected_destinations);
49004900
}
49014901
check_added_monitors(&nodes[2], 3);
49024902

@@ -5377,7 +5377,7 @@ fn do_htlc_claim_previous_remote_commitment_only(use_dust: bool, check_revoke_no
53775377
let htlc_value = if use_dust { 50000 } else { 3000000 };
53785378
let (_, our_payment_hash, ..) = route_payment(&nodes[0], &[&nodes[1]], htlc_value);
53795379
nodes[1].node.fail_htlc_backwards(&our_payment_hash);
5380-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
5380+
process_htlcs_and_expect_htlc_handling_failed!(
53815381
nodes[1],
53825382
[HTLCHandlingFailureType::Receive { payment_hash: our_payment_hash }]
53835383
);
@@ -6014,7 +6014,7 @@ pub fn test_update_fulfill_htlc_bolt2_after_malformed_htlc_message_must_forward_
60146014

60156015
check_added_monitors(&nodes[1], 0);
60166016
commitment_signed_dance!(nodes[1], nodes[2], update_msg.1, false, true);
6017-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
6017+
process_htlcs_and_expect_htlc_handling_failed!(
60186018
nodes[1],
60196019
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
60206020
);
@@ -6106,7 +6106,7 @@ pub fn test_channel_failed_after_message_with_badonion_node_perm_bits_set() {
61066106
_ => panic!("Unexpected event"),
61076107
}
61086108

6109-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
6109+
process_htlcs_and_expect_htlc_handling_failed!(
61106110
nodes[1],
61116111
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id: chan_2.2 }]
61126112
);
@@ -6188,7 +6188,7 @@ fn do_test_failure_delay_dust_htlc_local_commitment(announce_latest: bool) {
61886188
// Fail one HTLC to prune it in the will-be-latest-local commitment tx
61896189
nodes[1].node.fail_htlc_backwards(&payment_hash_2);
61906190
check_added_monitors(&nodes[1], 0);
6191-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
6191+
process_htlcs_and_expect_htlc_handling_failed!(
61926192
nodes[1],
61936193
[HTLCHandlingFailureType::Receive { payment_hash: payment_hash_2 }]
61946194
);
@@ -6554,7 +6554,7 @@ pub fn test_check_htlc_underpaying() {
65546554
// Note that we first have to wait a random delay before processing the receipt of the HTLC,
65556555
// and then will wait a second random delay before failing the HTLC back:
65566556
nodes[1].node.process_pending_htlc_forwards();
6557-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
6557+
process_htlcs_and_expect_htlc_handling_failed!(
65586558
nodes[1],
65596559
[HTLCHandlingFailureType::Receive { payment_hash: our_payment_hash }]
65606560
);
@@ -7986,7 +7986,7 @@ pub fn test_bad_secret_hash() {
79867986
// We have to forward pending HTLCs once to process the receipt of the HTLC and then
79877987
// again to process the pending backwards-failure of the HTLC
79887988
nodes[1].node.process_pending_htlc_forwards();
7989-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
7989+
process_htlcs_and_expect_htlc_handling_failed!(
79907990
nodes[1],
79917991
vec![HTLCHandlingFailureType::Receive { payment_hash: $payment_hash }]
79927992
);
@@ -9404,7 +9404,7 @@ fn do_test_tx_confirmed_skipping_blocks_immediate_broadcast(test_height_before_t
94049404
&[(0, htlc_tx)],
94059405
conf_height + 1,
94069406
);
9407-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
9407+
process_htlcs_and_expect_htlc_handling_failed!(
94089408
nodes[1],
94099409
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id }]
94109410
);
@@ -9434,7 +9434,7 @@ fn do_test_tx_confirmed_skipping_blocks_immediate_broadcast(test_height_before_t
94349434
// When the HTLC times out on the A<->B edge, the B<->C channel will fail the HTLC back to
94359435
// avoid the A<->B channel closing (even though it already has). This will generate a
94369436
// spurious HTLCHandlingFailed event.
9437-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
9437+
process_htlcs_and_expect_htlc_handling_failed!(
94389438
nodes[1],
94399439
[HTLCHandlingFailureType::Forward { node_id: Some(node_c_id), channel_id }]
94409440
);
@@ -9687,7 +9687,7 @@ pub fn test_inconsistent_mpp_params() {
96879687
nodes[2].node.handle_update_fail_htlc(node_d_id, &fail_updates_1.update_fail_htlcs[0]);
96889688
commitment_signed_dance!(nodes[2], nodes[3], fail_updates_1.commitment_signed, false);
96899689

9690-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(
9690+
process_htlcs_and_expect_htlc_handling_failed!(
96919691
nodes[2],
96929692
[HTLCHandlingFailureType::Forward { node_id: Some(node_d_id), channel_id: chan_2_3.2 }]
96939693
);
@@ -9762,7 +9762,7 @@ pub fn test_double_partial_claim() {
97629762
HTLCHandlingFailureType::Receive { payment_hash: hash },
97639763
HTLCHandlingFailureType::Receive { payment_hash: hash },
97649764
];
9765-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[3], failed_destinations);
9765+
process_htlcs_and_expect_htlc_handling_failed!(nodes[3], failed_destinations);
97669766

97679767
let reason = PaymentFailureReason::RecipientRejected;
97689768
pass_failed_payment_back(&nodes[0], paths, false, hash, reason);
@@ -10747,7 +10747,7 @@ fn do_payment_with_custom_min_final_cltv_expiry(valid_delta: bool, use_user_hash
1074710747
claim_payment(&nodes[0], &[&nodes[1]], payment_preimage);
1074810748
} else {
1074910749
let fail_type = HTLCHandlingFailureType::Receive { payment_hash: hash };
10750-
expect_pending_htlcs_forwardable_and_htlc_handling_failed!(nodes[1], [fail_type]);
10750+
process_htlcs_and_expect_htlc_handling_failed!(nodes[1], [fail_type]);
1075110751

1075210752
check_added_monitors(&nodes[1], 1);
1075310753

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)