setchannelfee: allow dualopend's "awaiting" state to be valid also

This commit is contained in:
niftynei 2020-11-30 15:49:01 -06:00 committed by Christian Decker
parent 79c01c1386
commit 0c520850b0

View file

@ -1969,7 +1969,8 @@ static struct command_result *json_setchannelfee(struct command *cmd,
if (channel
&& channel->state != CHANNELD_NORMAL
&& channel->state != CHANNELD_AWAITING_LOCKIN)
&& channel->state != CHANNELD_AWAITING_LOCKIN
&& channel->state != DUALOPEND_AWAITING_LOCKIN)
return command_fail(cmd, LIGHTNINGD,
"Channel is in state %s", channel_state_name(channel));
@ -1986,7 +1987,8 @@ static struct command_result *json_setchannelfee(struct command *cmd,
if (!channel)
continue;
if (channel->state != CHANNELD_NORMAL &&
channel->state != CHANNELD_AWAITING_LOCKIN)
channel->state != CHANNELD_AWAITING_LOCKIN &&
channel->state != DUALOPEND_AWAITING_LOCKIN)
continue;
set_channel_fees(cmd, channel, *base, *ppm, response);
}