From c63e65bfcc8e6d57bacba8a87fb94fe0fad94c8d Mon Sep 17 00:00:00 2001 From: niftynei Date: Fri, 27 Oct 2023 14:25:29 -0500 Subject: [PATCH] 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.. --- lightningd/dual_open_control.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lightningd/dual_open_control.c b/lightningd/dual_open_control.c index 9160aaca8..6b9afc310 100644 --- a/lightningd/dual_open_control.c +++ b/lightningd/dual_open_control.c @@ -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 "