Skip to content

Commit

Permalink
eth/tracers/logger: fix nit re empty lists vs nil
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Nov 26, 2024
1 parent cdbc0d2 commit 84783af
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions eth/tracers/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ func NewStreamingStructLogger(cfg *Config, writer io.Writer) *StructLogger {
func NewStructLogger(cfg *Config) *StructLogger {
logger := &StructLogger{
storage: make(map[common.Address]Storage),
logs: make([]json.RawMessage, 0),
}
if cfg != nil {
logger.cfg = *cfg
Expand All @@ -238,14 +239,6 @@ func (l *StructLogger) Hooks() *tracing.Hooks {
}
}

// Reset clears the data held by the logger.
func (l *StructLogger) Reset() {
l.storage = make(map[common.Address]Storage)
l.output = make([]byte, 0)
l.logs = l.logs[:0]
l.err = nil
}

// OnOpcode logs a new structured log message and pushes it out to the environment
//
// OnOpcode also tracks SLOAD/SSTORE ops to track storage change.
Expand Down

0 comments on commit 84783af

Please sign in to comment.