]> git.bitcoin.ninja Git - rust-lightning/commit
Don't generate a `ChannelMonitorUpdate` for closed chans on shutdown 2022-11-monitor-updates-always-async
authorMatt Corallo <git@bluematt.me>
Sun, 19 Feb 2023 00:13:51 +0000 (00:13 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 22 Feb 2023 17:34:46 +0000 (17:34 +0000)
commit2adb8eeb49ad2c7870984afdc49ed3d292113905
tree4748645914d8e1642e4a2f99e9416d7eaf4c1a13
parent685b08d8c13c62a3a4c4cf283c3d86b96fd3de23
Don't generate a `ChannelMonitorUpdate` for closed chans on shutdown

The `Channel::get_shutdown` docs are very clear - if the channel
jumps to `Shutdown` as a result of not being funded when we go to
initiate shutdown we should not generate a `ChannelMonitorUpdate`
as there's no need to bother with the shutdown script - we're
force-closing anyway.

However, this wasn't actually implemented, potentially causing a
spurious monitor update for no reason.
lightning/src/ln/channel.rs