diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 0e6921913..50c21b921 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -853,9 +853,9 @@ static void json_close(struct command *cmd, } /* Normal case. */ - if (channel->state == CHANNELD_NORMAL) { + if (channel->state == CHANNELD_NORMAL || channel->state == CHANNELD_AWAITING_LOCKIN) { channel_set_state(channel, - CHANNELD_NORMAL, CHANNELD_SHUTTING_DOWN); + channel->state, CHANNELD_SHUTTING_DOWN); if (channel->owner) subd_send_msg(channel->owner, diff --git a/tests/test_lightningd.py b/tests/test_lightningd.py index 1b1d16e28..754c231c0 100644 --- a/tests/test_lightningd.py +++ b/tests/test_lightningd.py @@ -3048,7 +3048,6 @@ class LightningDTests(BaseLightningDTests): l2.daemon.wait_for_logs(['sendrawtx exit 0', ' to CLOSINGD_COMPLETE']) assert l1.bitcoin.rpc.getmempoolinfo()['size'] == 1 - @unittest.expectedFailure def test_shutdown_awaiting_lockin(self): l1 = self.node_factory.get_node() l2 = self.node_factory.get_node(options=['--anchor-confirms=3'])