Closed mflaxman closed 2 years ago
Update: I thought I might be able to read the first byte and see if it was OP_1
-OP_15
and then use that to infer is_p2sh_multisig
. But when I tried that it threw other errors. I think it's possible for a non RedeemScript
to start with those same bytes.
The current PR still feels ugly, but I don't have a better solution.
added a PR for this PR in #126
This PR makes it possible to accurately
parse()
a p2sh redeemscript, but you have to opt into the newparse_hex()
method.It's the fewest lines of code to make this change, but it feels a little hackey. Also, moving the existing codebase over to use the new parsing logic will throw a ton of errors.
Any thoughts @jimmysong @dhruvbansal?
This is a proposed fix for https://github.com/buidl-bitcoin/buidl-python/issues/123