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, 1 Mar 2020 04:26:16 +0000 (23:26 -0500)
commitb10bf62a20d74e158ebcca22435cd1994fe2a15c
tree3c540bc51f46ee5e781c07d824ebdc4d15d778d2
parent539bada8bb59cf5287a050f493ca477bade1ff3c
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