You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi & thanks for your bitcoinutils package, very handy ! 👍 But I think I've spotted an issue.
Although Transaction.from_raw() is able to parse a signed or unsigned legacy tx, it is only able to correctly parse signed segwit txs because it assumes the presence of witnesses in the tx payload.
But unsigned segwit tx payloads do not have any witness field.
This PR proposes to fix that by checking the number of remaining bytes between the end of the last output and the end of the tx payload and by skipping the witnesses parsing if that number is not greater than 4 (i.e. last tx field i.e. locktime length).
The text was updated successfully, but these errors were encountered:
Hi & thanks for your
bitcoinutils
package, very handy ! 👍 But I think I've spotted an issue.Although
Transaction.from_raw() is
able to parse a signed or unsigned legacy tx, it is only able to correctly parse signed segwit txs because it assumes the presence of witnesses in the tx payload.But unsigned segwit tx payloads do not have any witness field.
This PR proposes to fix that by checking the number of remaining bytes between the end of the last output and the end of the tx payload and by skipping the witnesses parsing if that number is not greater than 4 (i.e. last tx field i.e. locktime length).
The text was updated successfully, but these errors were encountered: