diff --git a/common/utxo.c b/common/utxo.c index 6dd7e9198..b80224f4f 100644 --- a/common/utxo.c +++ b/common/utxo.c @@ -1,5 +1,6 @@ #include #include +#include #include #include @@ -60,7 +61,7 @@ struct bitcoin_tx *tx_spending_utxos(const tal_t *ctx, for (size_t i = 0; i < tal_count(utxos); i++) { if (utxos[i]->is_p2sh && bip32_base) { bip32_pubkey(bip32_base, &key, utxos[i]->keyindex); - script = bitcoin_scriptsig_p2sh_p2wpkh(tx, &key); + script = bitcoin_scriptsig_p2sh_p2wpkh(tmpctx, &key); } else { script = NULL; }