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.
This commit is contained in:
niftynei 2021-04-21 15:47:19 -05:00 committed by Rusty Russell
parent 5a04dc185c
commit 56e8d75dbb
1 changed files with 3 additions and 0 deletions

View File

@ -2021,6 +2021,9 @@ static void accepter_start(struct state *state, const u8 *oc2_msg)
if (!tx_state->psbt) if (!tx_state->psbt)
tx_state->psbt = create_psbt(tx_state, 0, 0, tx_state->psbt = create_psbt(tx_state, 0, 0,
tx_state->tx_locktime); tx_state->tx_locktime);
else
/* Locktimes must match! */
tx_state->psbt->tx->locktime = tx_state->tx_locktime;
/* Check that total funding doesn't overflow */ /* Check that total funding doesn't overflow */
if (!amount_sat_add(&total, tx_state->opener_funding, if (!amount_sat_add(&total, tx_state->opener_funding,