-
Notifications
You must be signed in to change notification settings - Fork 628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AssertionError when calculating SignatureHash #178
Comments
Fixed now that #187 is merged? |
|
and on v0.10.2 the assertion still happens. |
@dgpv Wait, what do you mean by your code snippet above? |
I just took this code snippet from the first message, and run it on the last version of the library. It did not cause exception. Then I checked out v0.10.2, and run the same code snippet, and got the same assertion as in the first message. I just mean "I did a one-time test on this, it worked" |
@dgpv Ah! Well, if you figure out a fix, pull-req accepted, and I'll try to merge it in a more reasonable amount of time than your other (much appreciated!) segwit improvements. :) |
I mean, this shows that #187 fixed the issue. The transaction in this issue contains 1-of-1 p2sh script:
Before #187 was merged, such script was wrongly detected as a witness program, which led to the assertion in SignatureHash. There's nothing to make a pull request for. Well, except maybe add test case for |
For example the transaction 858eb08ea0e24b052a5945270475af4e49f5b7158d9d5b6218bff53d1d9d53e9
results:
Possible workaround is to comment out line 1018
assert not script.is_witness_scriptpubkey()
, which then results the right SignatureHash '847b08415229a2a728f6a22077f2ad5c69faf6ae81d6c16f16e61425dc9a984f'.The text was updated successfully, but these errors were encountered: