Skip to content

Commit

Permalink
tx: Remove wally workaround that is no longer needed
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Griffiths <[email protected]>
  • Loading branch information
jgriffiths authored and rustyrussell committed Nov 29, 2020
1 parent 70977a4 commit 5bdad04
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions bitcoin/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5bdad04

Please sign in to comment.