From 8742141792f3fc8e9184b3188e823118074df681 Mon Sep 17 00:00:00 2001 From: Giulio rebuffo Date: Sun, 24 Apr 2022 10:17:33 +0200 Subject: [PATCH] fixed ethstats (#3951) --- ethstats/ethstats.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ethstats/ethstats.go b/ethstats/ethstats.go index 7be659303e7..fa0dc8a7241 100644 --- a/ethstats/ethstats.go +++ b/ethstats/ethstats.go @@ -503,6 +503,9 @@ func (s *Service) reportBlock(conn *connWrapper, block *types.Block) error { if err != nil { return err } + if block == nil { + return nil + } } td, err := rawdb.ReadTd(roTx, block.Hash(), block.NumberU64())