dualfund: if we don't have commitments, error openchannel_signed

You don't want to be adding sigs to channels we don't have commitment
transactions for..
This commit is contained in:
niftynei 2023-10-27 14:25:29 -05:00 committed by Rusty Russell
parent ca87afd5bb
commit c63e65bfcc

View File

@ -2693,6 +2693,11 @@ json_openchannel_signed(struct command *cmd,
&inflight->funding
->outpoint.txid));
if (!inflight->last_tx)
return command_fail(cmd, FUNDING_STATE_INVALID,
"Commitments for this channel not "
"yet secured, see `openchannel_update`");
if (inflight->funding_psbt && psbt_is_finalized(inflight->funding_psbt))
return command_fail(cmd, FUNDING_STATE_INVALID,
"Already have a finalized PSBT for "