Skip to content

Commit

Permalink
core/vm: make all opcodes proper type (#30925)
Browse files Browse the repository at this point in the history
commit ethereum/go-ethereum@5b9a3ea.

Noticed this omission while doing some work on goevmlab. We don't properly type
some of the opcodes, but apparently implicit casting works in all the internal
usecases.

This makes the debugger show the name of those missing type opcodes instead of
just hexadecimal value.
  • Loading branch information
holiman authored and minh-bq committed Jan 8, 2025
1 parent e14b3cf commit 200dd94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/vm/opcodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const (

// 0x80 range - dups.
const (
DUP1 = 0x80 + iota
DUP1 OpCode = 0x80 + iota
DUP2
DUP3
DUP4
Expand All @@ -186,7 +186,7 @@ const (

// 0x90 range - swaps.
const (
SWAP1 = 0x90 + iota
SWAP1 OpCode = 0x90 + iota
SWAP2
SWAP3
SWAP4
Expand Down

0 comments on commit 200dd94

Please sign in to comment.