Skip to content

Commit 4f949a9

Browse files
committed
Clean up log warning in the event ChannelMonitor force-closed
1 parent 2cb5b1a commit 4f949a9

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
@@ -1509,8 +1509,13 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
15091509
self.lockdown_from_offchain = true;
15101510
if *should_broadcast {
15111511
self.broadcast_latest_holder_commitment_txn(broadcaster, logger);
1512-
} else {
1512+
} else if !self.holder_tx_signed {
15131513
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");
1514+
} else {
1515+
// If we generated a MonitorEvent::CommitmentTxBroadcasted, the ChannelManager
1516+
// will still give us a ChannelForceClosed event with !should_broadcast, but we
1517+
// shouldn't print the scary warning above.
1518+
log_info!(logger, "Channel off-chain state closed after we broadcasted our latest commitment transaction.");
15141519
}
15151520
}
15161521
}

0 commit comments

Comments
 (0)