File tree 1 file changed +10
-2
lines changed
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> {
4658
4658
} else if non_shutdown_state == ( ChannelState :: FundingSent as u32 | ChannelState :: OurChannelReady as u32 ) {
4659
4659
// We got a reorg but not enough to trigger a force close, just ignore.
4660
4660
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) ;
4663
4661
} 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
+ }
4664
4672
// We got a reorg but not enough to trigger a force close, just ignore.
4665
4673
false
4666
4674
} ;
You can’t perform that action at this time.
0 commit comments