a more readable way

This commit is contained in:
SashaMalysehko 2025-12-10 08:57:02 +02:00 committed by GitHub
parent 8a8a195ce8
commit c8939a53a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -513,10 +513,9 @@ func defaultIgnoredOpcodes() []hexutil.Uint64 {
ignored := make([]hexutil.Uint64, 0, 64) ignored := make([]hexutil.Uint64, 0, 64)
// Allow all PUSHx, DUPx and SWAPx opcodes as they have sequential codes // Allow all PUSHx, DUPx and SWAPx opcodes as they have sequential codes
for op := vm.PUSH0; op < vm.SWAP16; op++ { for op := vm.PUSH0; op <= vm.SWAP16; op++ {
ignored = append(ignored, hexutil.Uint64(op)) ignored = append(ignored, hexutil.Uint64(op))
} }
ignored = append(ignored, hexutil.Uint64(vm.SWAP16))
for _, op := range []vm.OpCode{ for _, op := range []vm.OpCode{
vm.POP, vm.ADD, vm.SUB, vm.MUL, vm.POP, vm.ADD, vm.SUB, vm.MUL,