From 56e8d75dbb3d9efa9620b080ed7172dcc52a1463 Mon Sep 17 00:00:00 2001 From: niftynei Date: Wed, 21 Apr 2021 15:47:19 -0500 Subject: [PATCH] dualfund: set the locktime for the user-provided PSBT This is set by the peer and is non-negotiable. We're not even going to check if you got it right. You were told about it via `openchannel2`. It is what it is. --- openingd/dualopend.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openingd/dualopend.c b/openingd/dualopend.c index 1030316d9..bd7fc2e80 100644 --- a/openingd/dualopend.c +++ b/openingd/dualopend.c @@ -2021,6 +2021,9 @@ static void accepter_start(struct state *state, const u8 *oc2_msg) if (!tx_state->psbt) tx_state->psbt = create_psbt(tx_state, 0, 0, tx_state->tx_locktime); + else + /* Locktimes must match! */ + tx_state->psbt->tx->locktime = tx_state->tx_locktime; /* Check that total funding doesn't overflow */ if (!amount_sat_add(&total, tx_state->opener_funding,