eth/tracers/js: fix isPush for push0 (#28520)

Fixes so that `push0` opcode is correctly reported as `true` by the `IsPush` function

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
Sina Mahmoodi
2023-11-14 13:14:38 +01:00
committed by GitHub
co-authored by Martin Holst Swende
parent fa8d39807d
commit e803ef09ad
2 changed files with 32 additions and 48 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ type OpCode byte
// IsPush specifies if an opcode is a PUSH opcode.
func (op OpCode) IsPush() bool {
return PUSH1 <= op && op <= PUSH32
return PUSH0 <= op && op <= PUSH32
}
// 0x0 range - arithmetic ops.