]> git.bitcoin.ninja Git - rust-lightning/commit
Immediately error in `close_channel_internal` if there is no chan 2023-11-chan-close-loop
authorMatt Corallo <git@bluematt.me>
Wed, 29 Nov 2023 06:02:46 +0000 (06:02 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 8 Dec 2023 02:26:00 +0000 (02:26 +0000)
commit5ba4c079bb242f5a0279a36d24ba87e3d8d1d528
treeaf6c0e1c53019bca3a8bb794e41024fcdaa3d360
parent3a2690c8aac91e46c55060c84b41c692e18314ca
Immediately error in `close_channel_internal` if there is no chan

Previously, unfunded channels would be stored outside of
`PeerState::channel_by_id`, and thus if there is no channel when
we look in `PeerState::channel_by_id`, `close_channel_internal`
called `force_close_channel_with_peer` to hunt for unfunded
channels.

However, that is no longer the case, so the call is redundant, and
we can simply return an error instead.
lightning/src/ln/channelmanager.rs