Skip to content

Commit 140152b

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 f0f8c83 commit 140152b

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
@@ -2249,19 +2249,11 @@ impl<Signer: Sign> ChannelMonitorImpl<Signer> {
22492249
ChannelMonitorUpdateStep::ChannelForceClosed { should_broadcast } => {
22502250
log_trace!(logger, "Updating ChannelMonitor: channel force closed, should broadcast: {}", should_broadcast);
22512251
self.lockdown_from_offchain = true;
2252-
if *should_broadcast {
2253-
self.maybe_broadcast_latest_holder_commitment_txn(broadcaster, logger);
2254-
} else {
2255-
self.allow_automated_broadcast = false;
2256-
if !self.holder_tx_signed {
2257-
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");
2258-
} else {
2259-
// If we generated a MonitorEvent::CommitmentTxConfirmed, the ChannelManager
2260-
// will still give us a ChannelForceClosed event with !should_broadcast, but we
2261-
// shouldn't print the scary warning above.
2262-
log_info!(logger, "Channel off-chain state closed after we broadcasted our latest commitment transaction.");
2263-
}
2252+
self.allow_automated_broadcast = *should_broadcast;
2253+
if !*should_broadcast && self.holder_tx_signed {
2254+
log_info!(logger, "Channel off-chain state closed after we broadcasted our latest commitment transaction.");
22642255
}
2256+
self.maybe_broadcast_latest_holder_commitment_txn(broadcaster, logger);
22652257
},
22662258
ChannelMonitorUpdateStep::ShutdownScript { scriptpubkey } => {
22672259
log_trace!(logger, "Updating ChannelMonitor with shutdown script");

0 commit comments

Comments
 (0)