From: Matt Corallo <649246+TheBlueMatt@users.noreply.github.com> Date: Tue, 29 Jun 2021 20:13:50 +0000 (+0000) Subject: Merge pull request #965 from TheBlueMatt/2021-06-log-cleanups X-Git-Tag: v0.0.99~12 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=f4729075cbfef9f99e8316335dd1e8d15671674d;p=rust-lightning Merge pull request #965 from TheBlueMatt/2021-06-log-cleanups Cleanup logging --- f4729075cbfef9f99e8316335dd1e8d15671674d diff --cc lightning/src/ln/channel.rs index 9c81f797f,06308b01c..5f5bc51db --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@@ -1702,10 -1701,9 +1714,10 @@@ impl Channel Ok((channel_monitor, self.funding_transaction.as_ref().cloned().unwrap())) } - pub fn funding_locked(&mut self, msg: &msgs::FundingLocked) -> Result<(), ChannelError> { + pub fn funding_locked(&mut self, msg: &msgs::FundingLocked, logger: &L) -> Result<(), ChannelError> where L::Target: Logger { if self.channel_state & (ChannelState::PeerDisconnected as u32) == ChannelState::PeerDisconnected as u32 { - return Err(ChannelError::Close("Peer sent funding_locked when we needed a channel_reestablish".to_owned())); + self.workaround_lnd_bug_4006 = Some(msg.clone()); + return Err(ChannelError::Ignore("Peer sent funding_locked when we needed a channel_reestablish. The peer is likely lnd, see https://github.com/lightningnetwork/lnd/issues/4006".to_owned())); } let non_shutdown_state = self.channel_state & (!MULTI_STATE_FLAGS);