Make sure case with only one value in scriptSig as P2SH ONLY applies if the script is P2WPKH or P2WSH
This commit is contained in:
parent
1d168592a3
commit
e4db4a07b0
@ -21,8 +21,8 @@ function check (script, allowIncomplete) {
|
|||||||
|
|
||||||
var inputType = bscript.classifyInput(scriptSigChunks, allowIncomplete)
|
var inputType = bscript.classifyInput(scriptSigChunks, allowIncomplete)
|
||||||
var outputType = bscript.classifyOutput(redeemScriptChunks)
|
var outputType = bscript.classifyOutput(redeemScriptChunks)
|
||||||
if (chunks.length === 1 && (outputType === bscript.types.P2WSH || outputType === bscript.types.P2WPKH)) {
|
if (chunks.length === 1) {
|
||||||
return true
|
return outputType === bscript.types.P2WSH || outputType === bscript.types.P2WPKH
|
||||||
}
|
}
|
||||||
|
|
||||||
return inputType === outputType
|
return inputType === outputType
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user