From 4ac2a04ec8eb1dcd4ccdadc398f7533f4bcc1422 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Fri, 8 Dec 2023 10:23:13 -0800 Subject: [PATCH] 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. --- lightning/src/ln/channel.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }; -- 2.39.5