mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-13 11:36:37 +00:00
eth/tracers/logger: rename WriteTo to Write (#33227)
This commit is contained in:
parent
9bab01bee4
commit
6426257c0f
1 changed files with 4 additions and 4 deletions
|
|
@ -94,8 +94,8 @@ func (s *StructLog) ErrorString() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// WriteTo writes the human-readable log data into the supplied writer.
|
// Write writes the human-readable log data into the supplied writer.
|
||||||
func (s *StructLog) WriteTo(writer io.Writer) {
|
func (s *StructLog) Write(writer io.Writer) {
|
||||||
fmt.Fprintf(writer, "%-16spc=%08d gas=%v cost=%v", s.Op, s.Pc, s.Gas, s.GasCost)
|
fmt.Fprintf(writer, "%-16spc=%08d gas=%v cost=%v", s.Op, s.Pc, s.Gas, s.GasCost)
|
||||||
if s.Err != nil {
|
if s.Err != nil {
|
||||||
fmt.Fprintf(writer, " ERROR: %v", s.Err)
|
fmt.Fprintf(writer, " ERROR: %v", s.Err)
|
||||||
|
|
@ -324,7 +324,7 @@ func (l *StructLogger) OnOpcode(pc uint64, opcode byte, gas, cost uint64, scope
|
||||||
l.logs = append(l.logs, entry)
|
l.logs = append(l.logs, entry)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.WriteTo(l.writer)
|
log.Write(l.writer)
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnExit is called a call frame finishes processing.
|
// OnExit is called a call frame finishes processing.
|
||||||
|
|
@ -405,7 +405,7 @@ func (l *StructLogger) Output() []byte { return l.output }
|
||||||
// @deprecated
|
// @deprecated
|
||||||
func WriteTrace(writer io.Writer, logs []StructLog) {
|
func WriteTrace(writer io.Writer, logs []StructLog) {
|
||||||
for _, log := range logs {
|
for _, log := range logs {
|
||||||
log.WriteTo(writer)
|
log.Write(writer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue