Skip to content

Commit cf24a1f

Browse files
committed
Remove second reference to toxic holder commitment txn but keeping the info log in the case the txn is already signed.
1 parent e8e083b commit cf24a1f

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,19 +2039,11 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
20392039
ChannelMonitorUpdateStep::ChannelForceClosed { should_broadcast } => {
20402040
log_trace!(logger, "Updating ChannelMonitor: channel force closed, should broadcast: {}", should_broadcast);
20412041
self.lockdown_from_offchain = true;
2042-
if *should_broadcast {
2043-
self.maybe_broadcast_latest_holder_commitment_txn(broadcaster, logger);
2044-
} else {
2045-
self.allow_automated_broadcast = false;
2046-
if !self.holder_tx_signed {
2047-
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");
2048-
} else {
2049-
// If we generated a MonitorEvent::CommitmentTxConfirmed, the ChannelManager
2050-
// will still give us a ChannelForceClosed event with !should_broadcast, but we
2051-
// shouldn't print the scary warning above.
2052-
log_info!(logger, "Channel off-chain state closed after we broadcasted our latest commitment transaction.");
2053-
}
2042+
self.allow_automated_broadcast = *should_broadcast;
2043+
if !*should_broadcast && self.holder_tx_signed {
2044+
log_info!(logger, "Channel off-chain state closed after we broadcasted our latest commitment transaction.");
20542045
}
2046+
self.maybe_broadcast_latest_holder_commitment_txn(broadcaster, logger);
20552047
},
20562048
ChannelMonitorUpdateStep::ShutdownScript { scriptpubkey } => {
20572049
log_trace!(logger, "Updating ChannelMonitor with shutdown script");

0 commit comments

Comments
 (0)