X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fchanmon_update_fail_tests.rs;fp=lightning%2Fsrc%2Fln%2Fchanmon_update_fail_tests.rs;h=ce07cb73713aff10e222a4a55775b2edbcd7bcf6;hb=68af6d080968f67e965b94f2cee1dea662e3c161;hp=493607639f5e9d15935c192b1f83cdddbb004e82;hpb=07f33800a163ba867a8ac8d22130e8f7058b96ed;p=rust-lightning diff --git a/lightning/src/ln/chanmon_update_fail_tests.rs b/lightning/src/ln/chanmon_update_fail_tests.rs index 49360763..ce07cb73 100644 --- a/lightning/src/ln/chanmon_update_fail_tests.rs +++ b/lightning/src/ln/chanmon_update_fail_tests.rs @@ -1612,7 +1612,10 @@ fn test_monitor_update_fail_claim() { let (payment_preimage_1, payment_hash_1, ..) = route_payment(&nodes[0], &[&nodes[1]], 1_000_000); chanmon_cfgs[1].persister.set_update_ret(ChannelMonitorUpdateStatus::InProgress); + // As long as the preimage isn't on-chain, we shouldn't expose the `PaymentClaimed` event to + // users nor send the preimage to peers in the new commitment update. nodes[1].node.claim_funds(payment_preimage_1); + assert!(nodes[1].node.get_and_clear_pending_events().is_empty()); assert!(nodes[1].node.get_and_clear_pending_msg_events().is_empty()); check_added_monitors!(nodes[1], 1);