Fix (and test) panic when our counterparty uses a bogus funding tx 2021-04-fix-chan-shutdown-crash
authorMatt Corallo <git@bluematt.me>
Wed, 21 Apr 2021 00:11:54 +0000 (00:11 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 23 Apr 2021 22:52:43 +0000 (22:52 +0000)
During the block API refactor, we started calling
Channel::force_shutdown when a channel is closed due to a bogus
funding tx. However, we still set the channel's state to Shutdown
prior to doing so, leading to an assertion in force_shutdown (that
the channel is not already closed).

This removes the state-set call and adds a (long-overdue) test for
this case.

Fixes: 60b962a18ebcf494340ddc001870f8160c625968

No differences found