mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
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:
parent
6e92486296
commit
b022ba2c5d
2 changed files with 4 additions and 1 deletions
|
|
@ -212,6 +212,7 @@ const (
|
|||
|
||||
STATICCALL OpCode = 0xfa
|
||||
REVERT OpCode = 0xfd
|
||||
INVALID OpCode = 0xfe
|
||||
SELFDESTRUCT OpCode = 0xff
|
||||
)
|
||||
|
||||
|
|
@ -376,6 +377,7 @@ var opCodeToString = map[OpCode]string{
|
|||
CREATE2: "CREATE2",
|
||||
STATICCALL: "STATICCALL",
|
||||
REVERT: "REVERT",
|
||||
INVALID: "INVALID",
|
||||
SELFDESTRUCT: "SELFDESTRUCT",
|
||||
}
|
||||
|
||||
|
|
@ -529,6 +531,7 @@ var stringToOp = map[string]OpCode{
|
|||
"RETURN": RETURN,
|
||||
"CALLCODE": CALLCODE,
|
||||
"REVERT": REVERT,
|
||||
"INVALID": INVALID,
|
||||
"SELFDESTRUCT": SELFDESTRUCT,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
"result": {
|
||||
"calls": [
|
||||
{
|
||||
"error": "invalid opcode: opcode 0xfe not defined",
|
||||
"error": "invalid opcode: INVALID",
|
||||
"from": "0x33056b5dcac09a9b4becad0e1dcf92c19bd0af76",
|
||||
"gas": "0x75fe3",
|
||||
"gasUsed": "0x75fe3",
|
||||
|
|
|
|||
Loading…
Reference in a new issue