tx: add setter for tx locktime

We need to update the psbt's global transaction simultaneously, so we
wrap access to the locktime in a method which will handle both
This commit is contained in:
niftynei
2020-05-21 22:16:11 -05:00
committed by Christian Decker
parent db8ef922ed
commit f9300e8480
5 changed files with 14 additions and 5 deletions

View File

@@ -276,8 +276,8 @@ struct bitcoin_tx *commit_tx(const tal_t *ctx,
*
* * locktime: upper 8 bits are 0x20, lower 24 bits are the lower 24 bits of the obscured commitment number
*/
tx->wtx->locktime
= (0x20000000 | (obscured_commitment_number & 0xFFFFFF));
bitcoin_tx_set_locktime(tx,
(0x20000000 | (obscured_commitment_number & 0xFFFFFF)));
/* BOLT #3:
*