Always return reserved opcode for always-illegal ops.

This commit is contained in:
Owain G. Ainsworth 2014-03-14 18:35:13 +00:00
parent 8beb0dec54
commit d6d755e411
2 changed files with 1 additions and 6 deletions

View File

@ -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.

View File

@ -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")