elements: Fix missing witness script entry for fee outputs

Fixes #3487
This commit is contained in:
Christian Decker
2020-02-07 14:55:46 +01:00
parent de5eaf2238
commit 9521549c49
3 changed files with 7 additions and 3 deletions

View File

@@ -269,7 +269,6 @@ struct bitcoin_tx *commit_tx(const tal_t *ctx,
assert(n <= tx->wtx->outputs_allocation_len);
tal_resize(htlcmap, n);
tal_resize(&(tx->output_witscripts), n);
/* BOLT #3:
*
@@ -307,6 +306,7 @@ struct bitcoin_tx *commit_tx(const tal_t *ctx,
bitcoin_tx_add_input(tx, funding_txid, funding_txout, sequence, funding, NULL);
elements_tx_add_fee_output(tx);
tal_resize(&(tx->output_witscripts), tx->wtx->num_outputs);
return tx;
}