File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -4658,9 +4658,17 @@ impl<Signer: Sign> Channel<Signer> {
46584658 } else if non_shutdown_state == ( ChannelState :: FundingSent as u32 | ChannelState :: OurChannelReady as u32 ) {
46594659 // We got a reorg but not enough to trigger a force close, just ignore.
46604660 false
4661- } else if self . channel_state < ChannelState :: ChannelFunded as u32 {
4662- panic ! ( "Started confirming a channel in a state pre-FundingSent?: {}" , self . channel_state) ;
46634661 } else {
4662+ if self . channel_state < ChannelState :: ChannelFunded as u32 {
4663+ // We should never see a funding transaction on-chain until we've received
4664+ // funding_signed (if we're an outbound channel), or seen funding_generated (if we're
4665+ // an inbound channel - before that we have no known funding TXID). The fuzzer,
4666+ // however, may do this and we shouldn't treat it as a bug.
4667+ #[ cfg( not( fuzzing) ) ]
4668+ panic ! ( "Started confirming a channel in a state pre-FundingSent: {}.\n \
4669+ Do NOT broadcast a funding transaction manually - let LDK do it for you!",
4670+ self . channel_state) ;
4671+ }
46644672 // We got a reorg but not enough to trigger a force close, just ignore.
46654673 false
46664674 } ;
You can’t perform that action at this time.
0 commit comments