mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 19:30:44 +00:00
eth/tracers/native: only print non-zero counts
This commit is contained in:
parent
fe5ad101e8
commit
73836aa4c3
1 changed files with 3 additions and 1 deletions
|
|
@ -38,7 +38,9 @@ func (c *OpcodeCounter) Hooks() *tracing.Hooks {
|
|||
func (c *OpcodeCounter) Results() map[string]uint64 {
|
||||
out := make(map[string]uint64, len(c.counts))
|
||||
for op, count := range c.counts {
|
||||
if count != 0 {
|
||||
out[vm.OpCode(op).String()] = count
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue