Browse Source

lightningd: fix crash on failed close.

Fixes: #2056
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
plugin-1
Rusty Russell 6 years ago
committed by Christian Decker
parent
commit
322d483b36
  1. 4
      lightningd/peer_control.c

4
lightningd/peer_control.c

@ -946,9 +946,11 @@ static void json_close(struct command *cmd,
if (channel->state != CHANNELD_NORMAL &&
channel->state != CHANNELD_AWAITING_LOCKIN &&
channel->state != CHANNELD_SHUTTING_DOWN &&
channel->state != CLOSINGD_SIGEXCHANGE)
channel->state != CLOSINGD_SIGEXCHANGE) {
command_fail(cmd, LIGHTNINGD, "Channel is in state %s",
channel_state_name(channel));
return;
}
/* If normal or locking in, transition to shutting down
* state.

Loading…
Cancel
Save