mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
lightningd: allow us to close channel while still awaiting lockin.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
1773b03380
commit
1f9ad06056
@ -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,
|
||||
|
@ -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'])
|
||||
|
Loading…
Reference in New Issue
Block a user