]> git.bitcoin.ninja Git - rust-lightning/commit
Close channels when `find_funding_output` fails to find an output
authorMatt Corallo <git@bluematt.me>
Mon, 29 Apr 2024 18:12:59 +0000 (18:12 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 30 Apr 2024 13:43:32 +0000 (13:43 +0000)
commit6960210f604964583bfe704d6f956cadddcd15a2
treeb86f03941a930c6613bdc4b72f90f325f8b6d601
parent2b14cc40a6acf226aafaddd0efe67264c0df706f
Close channels when `find_funding_output` fails to find an output

In `funding_transaction_generated_intern`, if `find_funding_output`
fails (e.g. due to the require output not being present in the
provided funding transaction) we'd previously not generated a
`ChannelClosed` event which leaves users possibly in a confused
state.

Here we fix this, also fixing the relevant tests to check for the
new event.

Fixes #2843.
lightning/src/ln/channelmanager.rs
lightning/src/ln/shutdown_tests.rs