From 2a668115e7ff4396de26c7bc744fe468b79fa482 Mon Sep 17 00:00:00 2001 From: lightclient Date: Thu, 22 Jan 2026 10:48:21 -0700 Subject: [PATCH] core/vm: use opcode name for tests instead of hex value --- core/vm/instructions_test.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/vm/instructions_test.go b/core/vm/instructions_test.go index 5c8052243e..56cb2686a6 100644 --- a/core/vm/instructions_test.go +++ b/core/vm/instructions_test.go @@ -1135,25 +1135,25 @@ func TestEIP8024_Execution(t *testing.T) { var err error for pc < uint64(len(code)) && err == nil { op := code[pc] - switch op { - case 0x00: + switch OpCode(op) { + case STOP: return - case 0x60: + case PUSH1: _, err = opPush1(&pc, evm, scope) - case 0x80: + case DUP1: dup1 := makeDup(1) _, err = dup1(&pc, evm, scope) - case 0x56: + case JUMP: _, err = opJump(&pc, evm, scope) - case 0x5b: + case JUMPDEST: _, err = opJumpdest(&pc, evm, scope) - case 0x15: + case ISZERO: _, err = opIszero(&pc, evm, scope) - case 0xe6: + case DUPN: _, err = opDupN(&pc, evm, scope) - case 0xe7: + case SWAPN: _, err = opSwapN(&pc, evm, scope) - case 0xe8: + case EXCHANGE: _, err = opExchange(&pc, evm, scope) default: err = &ErrInvalidOpCode{opcode: OpCode(op)}