From b5afc015ba2858683a590b69c6c789764925149a Mon Sep 17 00:00:00 2001 From: Hyunchel Kim Date: Thu, 12 Oct 2023 23:51:57 -0400 Subject: [PATCH] core/blockchain: warn on error messages This commit prints warning on error message returned while verifying the block header. --- core/blockchain.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/blockchain.go b/core/blockchain.go index baf2f9f82f..628d81caa4 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -409,7 +409,10 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis // The first thing the node will do is reconstruct the verification data for // the head block (ethash cache or clique voting snapshot). Might as well do // it in advance. - bc.engine.VerifyHeader(bc, bc.CurrentHeader()) + err = bc.engine.VerifyHeader(bc, bc.CurrentHeader()) + if err != nil { + log.Warn("Failed to verify the chain's head block", "err", err) + } // Check the current state of the block hashes and make sure that we do not have any of the bad blocks in our chain for hash := range BadHashes {