From: Wilmer Paulino Date: Fri, 8 Dec 2023 18:23:13 +0000 (-0800) Subject: Check funding transaction on outbound channels only X-Git-Tag: v0.0.123-beta~90^2~3 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=4ac2a04ec8eb1dcd4ccdadc398f7533f4bcc1422;p=rust-lightning Check funding transaction on outbound channels only This was a slight regression, but not a critical one. Only outbound channels should have a funding transaction present. --- diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index e77f502d1..f37b2c110 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -4176,8 +4176,8 @@ impl Channel where // first received the funding_signed. let mut funding_broadcastable = if self.context.is_outbound() && - matches!(self.context.channel_state, ChannelState::AwaitingChannelReady(flags) if !flags.is_set(AwaitingChannelReadyFlags::WAITING_FOR_BATCH)) || - matches!(self.context.channel_state, ChannelState::ChannelReady(_)) + (matches!(self.context.channel_state, ChannelState::AwaitingChannelReady(flags) if !flags.is_set(AwaitingChannelReadyFlags::WAITING_FOR_BATCH)) || + matches!(self.context.channel_state, ChannelState::ChannelReady(_))) { self.context.funding_transaction.take() } else { None };