From d6d755e411cadfcff143210741803f63da1a53bf Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Fri, 14 Mar 2014 18:35:13 +0000 Subject: [PATCH] Always return reserved opcode for always-illegal ops. --- opcode.go | 2 +- script.go | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/opcode.go b/opcode.go index c9c1747f..b89c84b9 100644 --- a/opcode.go +++ b/opcode.go @@ -943,7 +943,7 @@ func (pop *parsedOpcode) exec(s *Script) error { // Always-illegal opcodes are ``fail on program counter''. if pop.alwaysIllegal() { - return StackErrAlwaysIllegal + return StackErrReservedOpcode } // Note that this includes OP_RESERVED which counts as a push operation. diff --git a/script.go b/script.go index 8f72339a..30575337 100644 --- a/script.go +++ b/script.go @@ -52,11 +52,6 @@ var ( // is encountered. StackErrReservedOpcode = errors.New("Reserved Opcode") - // StackErrAlwaysIllegal is returned when an opcode marked as always - // illegal is encountered. Currently this is just OP_VERIF and - // OP_VERNOTIF. - StackErrAlwaysIllegal = errors.New("Always Illlegal instruction encountered") - // StackErrEarlyReturn is returned when OP_RETURN is executed in the // script. StackErrEarlyReturn = errors.New("Script returned early")