good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit df20b3b9 authored by Evgeny Danilenko's avatar Evgeny Danilenko Committed by GitHub
Browse files

core/vm: avoid duplicate log in json logger (#22825)

parent 37b55954
Branches
Tags
No related merge requests found
...@@ -87,8 +87,9 @@ func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, ...@@ -87,8 +87,9 @@ func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration,
Time time.Duration `json:"time"` Time time.Duration `json:"time"`
Err string `json:"error,omitempty"` Err string `json:"error,omitempty"`
} }
var errMsg string
if err != nil { if err != nil {
l.encoder.Encode(endLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed), t, err.Error()}) errMsg = err.Error()
} }
l.encoder.Encode(endLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed), t, ""}) l.encoder.Encode(endLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed), t, errMsg})
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment