From d7402b7360703f623a1f2553b86331763029ff49 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 14 Mar 2021 23:26:15 -0400 Subject: [PATCH] Clean up log warning in the event ChannelMonitor force-closed --- lightning/src/chain/channelmonitor.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lightning/src/chain/channelmonitor.rs b/lightning/src/chain/channelmonitor.rs index 24dfc57b6..28b6da472 100644 --- a/lightning/src/chain/channelmonitor.rs +++ b/lightning/src/chain/channelmonitor.rs @@ -1501,8 +1501,13 @@ impl ChannelMonitorImpl { self.lockdown_from_offchain = true; if *should_broadcast { self.broadcast_latest_holder_commitment_txn(broadcaster, logger); - } else { + } else if !self.holder_tx_signed { log_error!(logger, "You have a toxic holder commitment transaction avaible in channel monitor, read comment in ChannelMonitor::get_latest_holder_commitment_txn to be informed of manual action to take"); + } else { + // If we generated a MonitorEvent::CommitmentTxBroadcasted, the ChannelManager + // will still give us a ChannelForceClosed event with !should_broadcast, but we + // shouldn't print the scary warning above. + log_info!(logger, "Channel off-chain state closed after we broadcasted our latest commitment transaction."); } } } -- 2.39.5