]> git.bitcoin.ninja Git - rust-lightning/commit
Fix potential peer_state deadlocks in `finish_force_close_channel`
authorMatt Corallo <git@bluematt.me>
Mon, 25 Sep 2023 18:05:53 +0000 (18:05 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 26 Sep 2023 00:38:17 +0000 (00:38 +0000)
commitd6cd197adcbed941f0827751f4ae5121e133094b
tree218f0405e31e732a2b9d9929b7606bb476de1afb
parentce7463486ee1ae61e9af439c3d34d00244248ee9
Fix potential peer_state deadlocks in `finish_force_close_channel`

`ChannelManager::finish_force_close_channel` exists to do cleanups
which must happen without the `per_peer_state` mutex held. However,
because it lacked lock assertions, several changes snuck in
recently which resulted in it running with peer-state locks held,
risking a deadlock if some HTLCs need to be failed.
lightning/src/ln/channelmanager.rs