From 909f911ff792ec92e994372258cb78b0fc84efc1 Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Tue, 30 May 2023 10:22:23 +1200 Subject: [PATCH] psbt: implement psbt_append_output using psbt_insert_output. Signed-off-by: Jon Griffiths --- bitcoin/psbt.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bitcoin/psbt.c b/bitcoin/psbt.c index 643a120cf..c4249ffe7 100644 --- a/bitcoin/psbt.c +++ b/bitcoin/psbt.c @@ -200,13 +200,9 @@ struct wally_psbt_output *psbt_append_output(struct wally_psbt *psbt, const u8 *script, struct amount_sat amount) { - struct wally_psbt_output *out; - struct wally_tx_output *tx_out = wally_tx_output(NULL, script, amount); - - out = psbt_add_output(psbt, tx_out, psbt->num_outputs); - wally_tx_output_free(tx_out); - return out; + return psbt_insert_output(psbt, script, amount, psbt->num_outputs); } + struct wally_psbt_output *psbt_insert_output(struct wally_psbt *psbt, const u8 *script, struct amount_sat amount,