Fix to_remote SpendableOutputs generation in rare reorg cases 2021-07-to-remote-reorg
authorMatt Corallo <git@bluematt.me>
Thu, 29 Jul 2021 19:49:09 +0000 (19:49 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 4 Aug 2021 02:34:57 +0000 (02:34 +0000)
If we first see a local commitment transaction, and then a reorg
causes the confirmed channel close transaction to instead be a
remote commitment transaction, we would fail a spurious `if else`
check, resulting in us not generating the correct `SpendableOutput`
event for the to_remote output now confirmed on chain.

This resolves the incorrect logic and adds a regression test.


No differences found