Skip to content

Commit e84d9d1

Browse files
committed
f - debug_assert
1 parent 7bc39f9 commit e84d9d1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lightning/src/ln/channel.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@ impl<SP: Deref> Channel<SP> where
14271427
L::Target: Logger
14281428
{
14291429
let phase = core::mem::replace(&mut self.phase, ChannelPhase::Undefined);
1430-
if let ChannelPhase::UnfundedV2(chan) = phase {
1430+
let result = if let ChannelPhase::UnfundedV2(chan) = phase {
14311431
let logger = WithChannelContext::from(logger, &chan.context, None);
14321432
match chan.funding_tx_constructed(signing_session, &&logger) {
14331433
Ok((chan, commitment_signed, event)) => {
@@ -1442,7 +1442,10 @@ impl<SP: Deref> Channel<SP> where
14421442
} else {
14431443
self.phase = phase;
14441444
Err(ChannelError::Warn("Got a tx_complete message with no interactive transaction construction expected or in-progress".to_owned()))
1445-
}
1445+
};
1446+
1447+
debug_assert!(!matches!(self.phase, ChannelPhase::Undefined));
1448+
result
14461449
}
14471450
}
14481451

0 commit comments

Comments
 (0)