]> git.bitcoin.ninja Git - rust-lightning/commit
Add missing `update_maps_on_chan_removal` call in signer restore
authorMatt Corallo <git@bluematt.me>
Sun, 29 Sep 2024 19:30:48 +0000 (19:30 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 5 Nov 2024 20:13:48 +0000 (20:13 +0000)
commit9f9d448efbd0bbcefc2acb1a9d56f1c9bdd96289
treedfd930a30d08753b494d9eb24bacb1cdf9b0667b
parent1feb71375c0b0041c78aaa8dce9ef12ab3a6cd3b
Add missing `update_maps_on_chan_removal` call in signer restore

When a channel is closed, we have to call
`update_maps_on_chan_removal` in the same per-peer-state lock as
the removal of the `ChannelPhase` object. We forgot to do so in
`ChannelManager::signer_unblocked` leaving dangling references to
the channel.

We also take this opportunity to include more context in the
channel-closure log in `ChannelManager::signer_unblocked` and add
documentation to `update_maps_on_chan_removal` and
`finish_close_channel` to hopefully avoid this issue in the future.
lightning/src/ln/channelmanager.rs