Skip to content

Commit e4db4a0

Browse files
afk11dcousens
authored andcommitted
Make sure case with only one value in scriptSig as P2SH ONLY applies if the script is P2WPKH or P2WSH
1 parent 1d16859 commit e4db4a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/templates/scripthash/input.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ function check (script, allowIncomplete) {
2121

2222
var inputType = bscript.classifyInput(scriptSigChunks, allowIncomplete)
2323
var outputType = bscript.classifyOutput(redeemScriptChunks)
24-
if (chunks.length === 1 && (outputType === bscript.types.P2WSH || outputType === bscript.types.P2WPKH)) {
25-
return true
24+
if (chunks.length === 1) {
25+
return outputType === bscript.types.P2WSH || outputType === bscript.types.P2WPKH
2626
}
2727

2828
return inputType === outputType

0 commit comments

Comments
 (0)