Skip to content

Commit 418af58

Browse files
committed
f Drop expect_pending_htlcs_forwardable_conditions macro
1 parent 169302b commit 418af58

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

lightning/src/ln/functional_test_utils.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2356,17 +2356,6 @@ impl SendEvent {
23562356
}
23572357
}
23582358

2359-
#[macro_export]
2360-
/// Don't use this, use the identically-named function instead.
2361-
macro_rules! expect_pending_htlcs_forwardable_conditions {
2362-
($node: expr, $expected_failures: expr) => {
2363-
$crate::ln::functional_test_utils::expect_pending_htlcs_forwardable_conditions(
2364-
$node.node.get_and_clear_pending_events(),
2365-
&$expected_failures,
2366-
);
2367-
};
2368-
}
2369-
23702359
#[macro_export]
23712360
macro_rules! expect_htlc_handling_failed_destinations {
23722361
($events: expr, $expected_failures: expr) => {{

lightning/src/ln/monitor_tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,8 +1182,8 @@ fn test_no_preimage_inbound_htlc_balances() {
11821182
let as_htlc_timeout_claim = nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().split_off(0);
11831183
assert_eq!(as_htlc_timeout_claim.len(), 1);
11841184
check_spends!(as_htlc_timeout_claim[0], as_txn[0]);
1185-
expect_pending_htlcs_forwardable_conditions!(nodes[0],
1186-
[HTLCHandlingFailureType::Receive { payment_hash: to_a_failed_payment_hash }]);
1185+
expect_pending_htlcs_forwardable_conditions(nodes[0].node.get_and_clear_pending_events(), &[HTLCHandlingFailureType::Receive { payment_hash: to_a_failed_payment_hash }]);
1186+
nodes[0].node.process_pending_htlc_forwards();
11871187

11881188
assert_eq!(as_pre_spend_claims,
11891189
sorted_vec(nodes[0].chain_monitor.chain_monitor.get_monitor(chan_id).unwrap().get_claimable_balances()));
@@ -1200,8 +1200,8 @@ fn test_no_preimage_inbound_htlc_balances() {
12001200
// The next few blocks for B look the same as for A, though for the opposite HTLC
12011201
nodes[1].tx_broadcaster.txn_broadcasted.lock().unwrap().clear();
12021202
connect_blocks(&nodes[1], TEST_FINAL_CLTV - (ANTI_REORG_DELAY - 1));
1203-
expect_pending_htlcs_forwardable_conditions!(nodes[1],
1204-
[HTLCHandlingFailureType::Receive { payment_hash: to_b_failed_payment_hash }]);
1203+
expect_pending_htlcs_forwardable_conditions(nodes[1].node.get_and_clear_pending_events(), &[HTLCHandlingFailureType::Receive { payment_hash: to_b_failed_payment_hash }]);
1204+
nodes[1].node.process_pending_htlc_forwards();
12051205
let bs_htlc_timeout_claim = nodes[1].tx_broadcaster.txn_broadcasted.lock().unwrap().split_off(0);
12061206
assert_eq!(bs_htlc_timeout_claim.len(), 1);
12071207
check_spends!(bs_htlc_timeout_claim[0], as_txn[0]);

0 commit comments

Comments
 (0)