File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1392,13 +1392,17 @@ impl<SP: Deref> Channel<SP> where
13921392 {
13931393 let phase = core::mem::replace(&mut self.phase, ChannelPhase::Undefined);
13941394 let result = if let ChannelPhase::UnfundedOutboundV1(chan) = phase {
1395+ #[cfg(debug_assertions)]
1396+ let channel_state = chan.context.channel_state;
13951397 let logger = WithChannelContext::from(logger, &chan.context, None);
13961398 match chan.funding_signed(msg, best_block, signer_provider, &&logger) {
13971399 Ok((chan, monitor)) => {
1400+ debug_assert!(matches!(chan.context.channel_state, ChannelState::AwaitingChannelReady(_)));
13981401 self.phase = ChannelPhase::Funded(chan);
13991402 Ok(monitor)
14001403 },
14011404 Err((chan, e)) => {
1405+ debug_assert_eq!(chan.context.channel_state, channel_state);
14021406 self.phase = ChannelPhase::UnfundedOutboundV1(chan);
14031407 Err(e)
14041408 },
You can’t perform that action at this time.
0 commit comments