From 67fbb349b6c910099cdbcf361f81f035bcbdf9f0 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 21 Sep 2020 19:54:26 +0930 Subject: [PATCH] bitcoin/tx: trivial cleanups. Signed-off-by: Rusty Russell --- bitcoin/tx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bitcoin/tx.c b/bitcoin/tx.c index 714a3684f..bbdf306a2 100644 --- a/bitcoin/tx.c +++ b/bitcoin/tx.c @@ -346,7 +346,7 @@ void bitcoin_tx_input_set_witness(struct bitcoin_tx *tx, int innum, if (stack) wally_tx_witness_stack_free(stack); if (taken(witness)) - tal_free(witness); + tal_free(witness); } void bitcoin_tx_input_set_script(struct bitcoin_tx *tx, int innum, u8 *script) @@ -478,12 +478,10 @@ struct bitcoin_tx *bitcoin_tx(const tal_t *ctx, if (chainparams->is_elements) output_count += 1; - wally_tx_init_alloc(WALLY_TX_VERSION_2, 0, input_count, output_count, + wally_tx_init_alloc(WALLY_TX_VERSION_2, nlocktime, input_count, output_count, &tx->wtx); tal_add_destructor(tx, bitcoin_tx_destroy); - tx->wtx->locktime = nlocktime; - tx->wtx->version = 2; tx->chainparams = chainparams; tx->psbt = new_psbt(tx, tx->wtx);