mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +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 ""
|
||||
}
|
||||
|
||||
// WriteTo writes the human-readable log data into the supplied writer.
|
||||
func (s *StructLog) WriteTo(writer io.Writer) {
|
||||
// Write writes the human-readable log data into the supplied 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)
|
||||
if s.Err != nil {
|
||||
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)
|
||||
return
|
||||
}
|
||||
log.WriteTo(l.writer)
|
||||
log.Write(l.writer)
|
||||
}
|
||||
|
||||
// OnExit is called a call frame finishes processing.
|
||||
|
|
@ -405,7 +405,7 @@ func (l *StructLogger) Output() []byte { return l.output }
|
|||
// @deprecated
|
||||
func WriteTrace(writer io.Writer, logs []StructLog) {
|
||||
for _, log := range logs {
|
||||
log.WriteTo(writer)
|
||||
log.Write(writer)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue