Skip to content

Commit 130464e

Browse files
committed
(Very) marginally expand test_monitor_update_fail_claim
For some reason I wasn't sure this happened yet, so making the test for no-`PaymentSent`-event-before-preimage-on-disk explicit is nice.
1 parent 07f3380 commit 130464e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lightning/src/ln/chanmon_update_fail_tests.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1612,7 +1612,10 @@ fn test_monitor_update_fail_claim() {
16121612
let (payment_preimage_1, payment_hash_1, ..) = route_payment(&nodes[0], &[&nodes[1]], 1_000_000);
16131613

16141614
chanmon_cfgs[1].persister.set_update_ret(ChannelMonitorUpdateStatus::InProgress);
1615+
// As long as the preimage isn't on-chain, we shouldn't expose the `PaymentSent` event to users
1616+
// nor send the preimage to peers in the new commitment update.
16151617
nodes[1].node.claim_funds(payment_preimage_1);
1618+
assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
16161619
assert!(nodes[1].node.get_and_clear_pending_msg_events().is_empty());
16171620
check_added_monitors!(nodes[1], 1);
16181621

0 commit comments

Comments
 (0)