core/blockchain: warn on error messages

This commit prints warning on error message returned while verifying the
block header.
This commit is contained in:
Hyunchel Kim 2023-10-12 23:51:57 -04:00
parent 2f66d7c47c
commit b5afc015ba
No known key found for this signature in database
GPG key ID: 0436BF9838B5CCC5

View file

@ -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 {