Skip to content

Commit b6e7486

Browse files
committed
Use macro instead of expansion.
1 parent 92819dc commit b6e7486

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

lightning/src/ln/monitor_tests.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2239,19 +2239,7 @@ fn test_anchors_aggregated_revoked_htlc_tx() {
22392239
&[&outputs[0]], Vec::new(), Script::new_op_return(&[]), 253, None, &Secp256k1::new(),
22402240
).unwrap();
22412241

2242-
{ // recursively expanded macro
2243-
let get_output = |out_point: &bitcoin::blockdata::transaction::OutPoint| {
2244-
let revoked_claim_transaction = revoked_claim_transactions.get(&out_point.txid);
2245-
if let Some(revoked_claim_tx) = revoked_claim_transaction {
2246-
for outp in revoked_claim_tx.output.iter() {
2247-
assert!(outp.value >= outp.script_pubkey.dust_value().to_sat(), "Input tx output didn't meet dust limit");
2248-
}
2249-
return revoked_claim_tx.output.get(out_point.vout as usize).cloned();
2250-
}
2251-
None
2252-
};
2253-
do_check_spends(&spend_tx, get_output);
2254-
}
2242+
check_spends!(spend_tx, revoked_claim_transactions.get(&spend_tx.input[0].previous_output.txid).unwrap());
22552243
} else {
22562244
panic!("unexpected event");
22572245
}

0 commit comments

Comments
 (0)