From f311488d2cfc25292d9ee8b1ef40a2bdd10a6d94 Mon Sep 17 00:00:00 2001 From: gary rong Date: Tue, 3 Aug 2021 23:32:13 +0800 Subject: [PATCH] internal/ethapi: fix trace log marshalling (#23292) --- internal/ethapi/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 826934a9c..30f6dd06a 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1120,7 +1120,7 @@ type StructLogRes struct { Gas uint64 `json:"gas"` GasCost uint64 `json:"gasCost"` Depth int `json:"depth"` - Error error `json:"error,omitempty"` + Error string `json:"error,omitempty"` Stack *[]string `json:"stack,omitempty"` Memory *[]string `json:"memory,omitempty"` Storage *map[string]string `json:"storage,omitempty"` @@ -1136,7 +1136,7 @@ func FormatLogs(logs []vm.StructLog) []StructLogRes { Gas: trace.Gas, GasCost: trace.GasCost, Depth: trace.Depth, - Error: trace.Err, + Error: trace.ErrorString(), } if trace.Stack != nil { stack := make([]string, len(trace.Stack)) -- GitLab