]> git.bitcoin.ninja Git - rust-lightning/commit
Only generate an `Event::DiscardFunding` when we need to
authorMatt Corallo <git@bluematt.me>
Tue, 27 Aug 2024 19:17:06 +0000 (19:17 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 27 Aug 2024 19:31:25 +0000 (19:31 +0000)
commit1e285cb417fe43503c96533508f1127fba26d99b
treeb896d6b79b4d5ac64094151ddd729a68a3cd3fb3
parent5e62df7f204d7b5f93eaf7adabe0ec4f68a1e067
Only generate an `Event::DiscardFunding` when we need to

5e874c3dc9cf1606a3cbbccab3a0d25089a97280 changed
`Event::DiscardFunding` to not include a dummy transaction when we
were funded without a full funding tx, but in doing so started
generating `DiscardFunding` events on every channel closure rather
than only when there's actually still a pending funding broadcast.

This restores the previous behavior to only generate the event when
we should actually discard the funding tx.
lightning/src/ln/channelmanager.rs