Skip to content

Commit a577f32

Browse files
committed
Fail all ChannelMonitorUpdates after holder_tx_signed
If we've signed the latest holder tx (i.e. we've force-closed and broadcasted our state), there's not much reason to accept counterparty-transaction-updating `ChannelMonitorUpdate`s, we should make sure the `ChannelManager` fails the channel as soon as possible. This standardizes the failure cases to also match those added to the previous commit, which makes things a bit more readable.
1 parent ff344b4 commit a577f32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/chain/channelmonitor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3282,7 +3282,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
32823282
}
32833283
}
32843284

3285-
if ret.is_ok() && (self.funding_spend_seen || self.lockdown_from_offchain) && is_pre_close_update {
3285+
if ret.is_ok() && (self.funding_spend_seen || self.lockdown_from_offchain || self.holder_tx_signed) && is_pre_close_update {
32863286
log_error!(logger, "Refusing Channel Monitor Update as counterparty attempted to update commitment after funding was spent");
32873287
Err(())
32883288
} else { ret }

0 commit comments

Comments
 (0)