core/vm: Make INVALID a defined opcode (#24017)

* core/vm: Define 0xfe opcode as INVALID

* core/vm: Remove opInvalid as opUndefined handles it

Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
This commit is contained in:
Andrei Maiboroda
2021-12-17 13:44:05 +01:00
committed by GitHub
parent 81ec6b1d4c
commit 3e47e38a4e
4 changed files with 6 additions and 3 deletions

View File

@ -213,6 +213,7 @@ const (
STATICCALL OpCode = 0xfa
REVERT OpCode = 0xfd
INVALID OpCode = 0xfe
SELFDESTRUCT OpCode = 0xff
)
@ -378,6 +379,7 @@ var opCodeToString = map[OpCode]string{
CREATE2: "CREATE2",
STATICCALL: "STATICCALL",
REVERT: "REVERT",
INVALID: "INVALID",
SELFDESTRUCT: "SELFDESTRUCT",
}
@ -532,6 +534,7 @@ var stringToOp = map[string]OpCode{
"RETURN": RETURN,
"CALLCODE": CALLCODE,
"REVERT": REVERT,
"INVALID": INVALID,
"SELFDESTRUCT": SELFDESTRUCT,
}