-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix Signature.prototype.hasDefinedHashtype #22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I assume this does fix the tests.
b597694
to
0934cda
Compare
lib/crypto/signature.js
Outdated
@@ -293,7 +293,11 @@ Signature.prototype.hasDefinedHashtype = function() { | |||
} | |||
// accept with or without Signature.SIGHASH_ANYONECANPAY by ignoring the bit | |||
var temp = this.nhashtype & ~Signature.SIGHASH_ANYONECANPAY; | |||
if (temp < (Signature.SIGHASH_ALL|Signature.SIGHASH_FORKID) || temp > (Signature.SIGHASH_SINGLE|Signature.SIGHASH_FORKID)) { | |||
|
|||
// accept with or without Signature.SIGHASH_FORKID by ignoring it too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this bit have to be ignored? Wouldn't FORKID necessarily be present all the time?
closing after discussion |
While investigating issues with bch-channel tests, ran into this. Seems wrong. Let's discuss.