From 5bdad04976ec58f8ea3a8b72a2b957abea1b7cd6 Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Fri, 27 Nov 2020 11:46:02 +1300 Subject: [PATCH] tx: Remove wally workaround that is no longer needed Signed-off-by: Jon Griffiths --- bitcoin/tx.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/bitcoin/tx.c b/bitcoin/tx.c index ee8c4584d..3155cecb9 100644 --- a/bitcoin/tx.c +++ b/bitcoin/tx.c @@ -353,18 +353,9 @@ void bitcoin_tx_input_set_witness(struct bitcoin_tx *tx, int innum, tal_wally_end(tx->wtx); /* Also add to the psbt */ - if (stack) { - tal_wally_start(); - wally_psbt_input_set_final_witness(&tx->psbt->inputs[innum], stack); - tal_wally_end(tx->psbt); - } else { - /* FIXME: libwally-psbt doesn't allow 'unsetting' of witness via - * the set method at the moment, so we do it manually*/ - struct wally_psbt_input *in = &tx->psbt->inputs[innum]; - if (in->final_witness) - wally_tx_witness_stack_free(in->final_witness); - in->final_witness = NULL; - } + tal_wally_start(); + wally_psbt_input_set_final_witness(&tx->psbt->inputs[innum], stack); + tal_wally_end(tx->psbt); if (taken(witness)) tal_free(witness);