bitcoin/psbt: wallt_tx_output needs a tal ctx.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-09-21 19:54:26 +09:30
parent 480f671e91
commit 607075a3d4
4 changed files with 10 additions and 7 deletions

View File

@@ -178,7 +178,7 @@ static struct command_result *finish_txprepare(struct command *cmd,
for (size_t i = 0; i < tal_count(txp->outputs); i++) {
struct wally_tx_output *out;
out = wally_tx_output(txp->outputs[i].script,
out = wally_tx_output(NULL, txp->outputs[i].script,
txp->outputs[i].amount);
if (!out)
return command_fail(cmd, JSONRPC2_INVALID_PARAMS,
@@ -189,6 +189,7 @@ static struct command_result *finish_txprepare(struct command *cmd,
struct amount_sat,
&txp->outputs[i].amount));
psbt_add_output(txp->psbt, out, i);
wally_tx_output_free(out);
}
/* If this is elements, we should normalize