mirror of
https://github.com/btcsuite/btcd.git
synced 2024-11-19 18:00:11 +01:00
Always return reserved opcode for always-illegal ops.
This commit is contained in:
parent
8beb0dec54
commit
d6d755e411
@ -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.
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user