Add witness is true to signing
This commit is contained in:
parent
f7d33c5357
commit
1495384862
1 changed files with 2 additions and 0 deletions
|
@ -87,6 +87,7 @@ function expandInput (scriptSig, witnessStack) {
|
|||
witnessScript = witnessStack[witnessStack.length - 1]
|
||||
witnessScriptType = bscript.classifyOutput(witnessScript)
|
||||
p2wsh = true
|
||||
witness = true
|
||||
if (scriptSig.length === 0) {
|
||||
prevOutScript = bscript.witnessScriptHash.output.encode(bcrypto.sha256(witnessScript))
|
||||
prevOutType = scriptTypes.P2WSH
|
||||
|
@ -112,6 +113,7 @@ function expandInput (scriptSig, witnessStack) {
|
|||
scriptType = witnessScriptType
|
||||
chunks = witnessStack.slice(0, -1)
|
||||
} else if (classifyWitness === scriptTypes.P2WPKH) {
|
||||
witness = true
|
||||
var key = witnessStack[witnessStack.length - 1]
|
||||
var keyHash = bcrypto.hash160(key)
|
||||
if (scriptSig.length === 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue