-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add tests for scripts.witness*.input and fixes #911
Conversation
We don't even use witness = buildStack(input.witnessScriptType, input.signatures, input.pubKeys, allowIncomplete)
witness.push(input.witnessScript) We do the same for // append redeemScript if necessary
if (p2sh) {
sig.push(input.redeemScript)
}
...
script: bscript.compile(sig), |
if (f.type !== 'pubkeyhash' && f.type !== 'witnesspubkeyhash') return | ||
if (!f.inputStack) return | ||
|
||
var pubKey = Buffer.from(f.pubKey, 'hex') |
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.
use fromHex here?
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.
@junderw I was only using fromHex
in the .map(function (x) { return Buffer.from(x, 'hex') })
case, if we had ES6 lambdas, I wouldn't have bothered.
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.
utACK
Published |
Resolves #862
witnessScriptHash
was a bit of a cluster... returnedredeemScriptSig
, a script, not witness data.Could be a breaking change, but I'd consider it a bug tbh.