Skip to content

Commit 102e355

Browse files
committed
Clean up log warning in the event ChannelMonitor force-closed
1 parent 3052cc6 commit 102e355

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1501,8 +1501,13 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
15011501
self.lockdown_from_offchain = true;
15021502
if *should_broadcast {
15031503
self.broadcast_latest_holder_commitment_txn(broadcaster, logger);
1504-
} else {
1504+
} else if !self.holder_tx_signed {
15051505
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");
1506+
} else {
1507+
// If we generated a MonitorEvent::CommitmentTxBroadcasted, the ChannelManager
1508+
// will still give us a ChannelForceClosed event with !should_broadcast, but we
1509+
// shouldn't print the scary warning above.
1510+
log_info!(logger, "Channel off-chain state closed after we broadcasted our latest commitment transaction.");
15061511
}
15071512
}
15081513
}

0 commit comments

Comments
 (0)