Skip to content

Commit 1d5e755

Browse files
committed
f Drop expect_pending_htlcs_forwardable_conditions macro
1 parent 62a37d2 commit 1d5e755

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
@@ -2334,17 +2334,6 @@ impl SendEvent {
23342334
}
23352335
}
23362336

2337-
#[macro_export]
2338-
/// Don't use this, use the identically-named function instead.
2339-
macro_rules! expect_pending_htlcs_forwardable_conditions {
2340-
($node: expr, $expected_failures: expr) => {
2341-
$crate::ln::functional_test_utils::expect_pending_htlcs_forwardable_conditions(
2342-
$node.node.get_and_clear_pending_events(),
2343-
&$expected_failures,
2344-
);
2345-
};
2346-
}
2347-
23482337
#[macro_export]
23492338
macro_rules! expect_htlc_handling_failed_destinations {
23502339
($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
@@ -1223,8 +1223,8 @@ fn test_no_preimage_inbound_htlc_balances() {
12231223
let as_htlc_timeout_claim = nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap().split_off(0);
12241224
assert_eq!(as_htlc_timeout_claim.len(), 1);
12251225
check_spends!(as_htlc_timeout_claim[0], as_txn[0]);
1226-
expect_pending_htlcs_forwardable_conditions!(nodes[0],
1227-
[HTLCHandlingFailureType::Receive { payment_hash: to_a_failed_payment_hash }]);
1226+
expect_pending_htlcs_forwardable_conditions(nodes[0].node.get_and_clear_pending_events(), &[HTLCHandlingFailureType::Receive { payment_hash: to_a_failed_payment_hash }]);
1227+
nodes[0].node.process_pending_htlc_forwards();
12281228

12291229
assert_eq!(as_pre_spend_claims,
12301230
sorted_vec(nodes[0].chain_monitor.chain_monitor.get_monitor(chan_id).unwrap().get_claimable_balances()));
@@ -1241,8 +1241,8 @@ fn test_no_preimage_inbound_htlc_balances() {
12411241
// The next few blocks for B look the same as for A, though for the opposite HTLC
12421242
nodes[1].tx_broadcaster.txn_broadcasted.lock().unwrap().clear();
12431243
connect_blocks(&nodes[1], TEST_FINAL_CLTV - (ANTI_REORG_DELAY - 1));
1244-
expect_pending_htlcs_forwardable_conditions!(nodes[1],
1245-
[HTLCHandlingFailureType::Receive { payment_hash: to_b_failed_payment_hash }]);
1244+
expect_pending_htlcs_forwardable_conditions(nodes[1].node.get_and_clear_pending_events(), &[HTLCHandlingFailureType::Receive { payment_hash: to_b_failed_payment_hash }]);
1245+
nodes[1].node.process_pending_htlc_forwards();
12461246
let bs_htlc_timeout_claim = nodes[1].tx_broadcaster.txn_broadcasted.lock().unwrap().split_off(0);
12471247
assert_eq!(bs_htlc_timeout_claim.len(), 1);
12481248
check_spends!(bs_htlc_timeout_claim[0], as_txn[0]);

0 commit comments

Comments
 (0)