mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 17:44:20 +01:00
tx: Remove wally workaround that is no longer needed
Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
This commit is contained in:
committed by
Rusty Russell
parent
70977a4fbd
commit
5bdad04976
15
bitcoin/tx.c
15
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);
|
||||
|
||||
Reference in New Issue
Block a user