Fix deadlock when handling bad calls to `batch_funding.._generated` 2024-01-batch-deadlock
authorMatt Corallo <git@bluematt.me>
Mon, 22 Jan 2024 20:26:32 +0000 (20:26 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 22 Jan 2024 21:22:54 +0000 (21:22 +0000)
commit983ca37a97eeabea86bbe864eb4688e86a4c41d4
tree9ffceaa2431022a814814ccde9e20024e7707cb4
parent5592378de27eb7453ccc70ac2d0b5c8d9b10e091
Fix deadlock when handling bad calls to `batch_funding.._generated`

When handling calls to `batch_funding_transaction_generated` which
were missing outputs for one of the batch channels, we'd previously
deadlock when trying to clean up the now-closed channels. This
fixes that and adds a new test case for it.

Found by the full_stack_target fuzzer.
lightning/src/ln/channelmanager.rs
lightning/src/ln/shutdown_tests.rs