wally: Migrate version and locktime to libwally tx

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2019-03-05 14:28:29 +01:00
committed by Rusty Russell
parent 9609d762c8
commit 16f72cb160
6 changed files with 19 additions and 19 deletions

View File

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