Skip to content

psbt: fix broken script finder in wally_finalize_psbt - #200

Merged
greenaddress merged 1 commit into
ElementsProject:masterfrom
niftynei:nifty/fix-borked-finalize
Jun 2, 2020
Merged

psbt: fix broken script finder in wally_finalize_psbt#200
greenaddress merged 1 commit into
ElementsProject:masterfrom
niftynei:nifty/fix-borked-finalize

Conversation

@niftynei

Copy link
Copy Markdown
Contributor

As written, this was looking at the output script on the global_tx for
an input on the same, which caused valgrind problems because A) there's
no guarantee that an output at that input index exists and also B)
that's not even the right script.

What you want to be doing is using the non_witness_utxo to look up the
script iff it exists.

If there's no out_script available we totally bail on finalizing this
input at all.

As written, this was looking at the output script on the global_tx for
an input on the same, which caused valgrind problems because A) there's
no guarantee that an output at that input index exists and also B)
that's not even the right script.

What you *want* to be doing is using the non_witness_utxo to look up the
script iff it exists.

If there's no out_script available we totally bail on finalizing this
input at all.
@LeoComandini

Copy link
Copy Markdown
Contributor

utack 5642664

@greenaddress
greenaddress merged commit 5642664 into ElementsProject:master Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants