Skip to content

Commit

Permalink
txscript/engine: Use optimized IsPushOnlyScript
Browse files Browse the repository at this point in the history
  • Loading branch information
cfromknecht committed Feb 5, 2021
1 parent e726274 commit 2f4de13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion txscript/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 2f4de13

Please sign in to comment.