From 10856bfcb0363c193f1fa24deffeee86daf4f07f Mon Sep 17 00:00:00 2001 From: Chris Ziogas Date: Thu, 23 Sep 2021 21:57:26 +0300 Subject: [PATCH] eth/tracers: trace_block will return node errors --- eth/tracers/api_parity.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eth/tracers/api_parity.go b/eth/tracers/api_parity.go index 90ed5bcad4..b5a827bab9 100644 --- a/eth/tracers/api_parity.go +++ b/eth/tracers/api_parity.go @@ -19,6 +19,7 @@ package tracers import ( "context" "encoding/json" + "errors" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -213,6 +214,9 @@ func (api *TraceAPI) Block(ctx context.Context, number rpc.BlockNumber, config * for _, result := range traceResults { var tmp []interface{} + if result.Error != "" { + return nil, errors.New(result.Error) + } if err := json.Unmarshal(result.Result.(json.RawMessage), &tmp); err != nil { return nil, err }