From a59e01c23c057d904cf4b23df0d85620b42a39cd Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Fri, 19 Apr 2019 00:43:38 -0700 Subject: [PATCH] txscript/engine: Use optimized IsPushOnlyScript --- txscript/engine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/txscript/engine.go b/txscript/engine.go index 06f454d3..f0a94851 100644 --- a/txscript/engine.go +++ b/txscript/engine.go @@ -950,7 +950,7 @@ func NewEngine(scriptPubKey []byte, tx *wire.MsgTx, txIdx int, flags ScriptFlags // the flag to verify signature scripts are push only is set // above, so avoid checking again. alreadyChecked := vm.hasFlag(ScriptVerifySigPushOnly) - if !alreadyChecked && !isPushOnly(vm.scripts[0]) { + if !alreadyChecked && !IsPushOnlyScript(scriptSig) { return nil, scriptError(ErrNotPushOnly, "pay to script hash is not push only") }