Skip to content

Commit de5266c

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 cc2e3c5 commit de5266c

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

lightning/src/chain/channelmonitor.rs

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

0 commit comments

Comments
 (0)