Skip to content

Commit 5d7a3f2

Browse files
committed
Make splice-funding confirmation assertions non-debug
We generally want to hard assert on cases that could cause us to lose money.
1 parent c5763db commit 5d7a3f2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4949,13 +4949,13 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
49494949
.iter()
49504950
.find(|funding| funding.funding_txid() == txid)
49514951
{
4952-
debug_assert!(self.alternative_funding_confirmed.is_none());
4953-
debug_assert!(
4952+
assert!(self.alternative_funding_confirmed.is_none());
4953+
assert!(
49544954
!self.onchain_events_awaiting_threshold_conf.iter()
49554955
.any(|e| matches!(e.event, OnchainEvent::AlternativeFundingConfirmation {}))
49564956
);
4957-
debug_assert!(self.funding_spend_confirmed.is_none());
4958-
debug_assert!(
4957+
assert!(self.funding_spend_confirmed.is_none());
4958+
assert!(
49594959
!self.onchain_events_awaiting_threshold_conf.iter()
49604960
.any(|e| matches!(e.event, OnchainEvent::FundingSpendConfirmation { .. }))
49614961
);

0 commit comments

Comments
 (0)