mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-28 19:34:25 +01:00
df: differentiate error message between
There's a difference between "no channel" and "channel in progress but no open available to cancel"
This commit is contained in:
@@ -1935,9 +1935,13 @@ json_openchannel_abort(struct command *cmd,
|
||||
return command_fail(cmd, FUNDING_PEER_NOT_CONNECTED,
|
||||
"Peer not connected");
|
||||
|
||||
if (!channel->open_attempt)
|
||||
if (!channel->open_attempt) {
|
||||
if (list_empty(&channel->inflights))
|
||||
return command_fail(cmd, FUNDING_STATE_INVALID,
|
||||
"Channel open not in progress");
|
||||
return command_fail(cmd, FUNDING_STATE_INVALID,
|
||||
"Channel open not in progress");
|
||||
"Sigs already exchanged, can't cancel");
|
||||
}
|
||||
|
||||
if (channel->open_attempt->cmd)
|
||||
return command_fail(cmd, FUNDING_STATE_INVALID,
|
||||
|
||||
Reference in New Issue
Block a user