Fix deadlock in handle_error!() when we have HTLCs to fail-back.
authorMatt Corallo <git@bluematt.me>
Mon, 13 Jan 2020 21:10:30 +0000 (16:10 -0500)
committerMatt Corallo <git@bluematt.me>
Sun, 26 Jan 2020 19:54:23 +0000 (14:54 -0500)
commitbaab176751308dadd07de5be24d36a0aa9d0e8ba
treec8dff624731473b165a8390c142a62fe6895447b
parent1ed82b02c4919e80a4c44453febc1e2bcfa68cee
Fix deadlock in handle_error!() when we have HTLCs to fail-back.

This partially reverts 933ae3470309f21ef7537ffbcdc42070d60e1e74,
though note that 933ae3470309f21ef7537ffbcdc42070d60e1e74 fixed a
similar deadlock while introducing this one.

If we have HTLCs to fail backwards, handle_error!() will call
finish_force_close() which will attempt to lock channel_state while
it is locked at the original caller.
lightning/src/ln/channelmanager.rs