tests/txb: add P2WSH(multisig), incomplete fixture
This commit is contained in:
parent
0157f18510
commit
5057d8d1ba
3 changed files with 68 additions and 9 deletions
|
@ -82,7 +82,7 @@ function expandInput (scriptSig, witnessStack) {
|
|||
script = redeemScript
|
||||
}
|
||||
|
||||
var classifyWitness = bscript.classifyWitness(witnessStack)
|
||||
var classifyWitness = bscript.classifyWitness(witnessStack, true)
|
||||
if (classifyWitness === scriptTypes.P2WSH) {
|
||||
witnessScript = witnessStack[witnessStack.length - 1]
|
||||
witnessScriptType = bscript.classifyOutput(witnessScript)
|
||||
|
@ -399,7 +399,6 @@ function buildStack (type, signatures, pubKeys, allowIncomplete) {
|
|||
}
|
||||
|
||||
if (!allowIncomplete) throw new Error('Not enough signatures provided')
|
||||
|
||||
return []
|
||||
}
|
||||
|
||||
|
@ -460,7 +459,7 @@ function buildInput (input, allowIncomplete) {
|
|||
return {
|
||||
type: scriptType,
|
||||
script: bscript.compile(sig),
|
||||
witness: witness
|
||||
witness: bscript.toStack(witness)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue