Skip to content

Commit 10f1ef1

Browse files
committed
Add note for alternative_funding_confirmed assertion in promote_funding
1 parent de2005a commit 10f1ef1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3851,6 +3851,9 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
38513851
self.outputs_to_watch.remove(&funding.funding_txid());
38523852
}
38533853
if let Some((alternative_funding_txid, _)) = self.alternative_funding_confirmed.take() {
3854+
// In exceedingly rare cases, it's possible there was a reorg that caused a potential funding to
3855+
// be locked in that this `ChannelMonitor` has not yet seen. Thus, we avoid a runtime assertion
3856+
// and only assert in debug mode.
38543857
debug_assert_eq!(alternative_funding_txid, new_funding_txid);
38553858
}
38563859

0 commit comments

Comments
 (0)