]> 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>
Wed, 9 Oct 2024 15:19:21 +0000 (15:19 +0000)
commit885d4c968edbaf75d94dd75abc5521356ca8ae27
tree4e0695a9d99a9f2ecacedacc000e79d69e0b5e47
parentcf9baf72d0b80e54dc513f53616590da6860894b
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