mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
eth/tracers/logger: fix nit re empty lists vs nil
This commit is contained in:
parent
8ebb222227
commit
2b0c1f42fe
1 changed files with 1 additions and 8 deletions
|
|
@ -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
|
||||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue