txscript/engine: Use optimized isScriptHashScript

This commit is contained in:
Conner Fromknecht 2019-04-19 00:49:23 -07:00 committed by Roy Lee
parent c0b2b10241
commit 2674b2926b

View file

@ -944,7 +944,7 @@ func NewEngine(scriptPubKey []byte, tx *wire.MsgTx, txIdx int, flags ScriptFlags
vm.scriptIdx++
}
if vm.hasFlag(ScriptBip16) && isScriptHash(vm.scripts[1]) {
if vm.hasFlag(ScriptBip16) && isScriptHashScript(scriptPubKey) {
// Only accept input scripts that push data for P2SH.
// Notice that the push only checks have already been done when
// the flag to verify signature scripts are push only is set