From 0fa36966d41bc99f0b418ccb92bfb3244bc914fd Mon Sep 17 00:00:00 2001 From: alan <652732310@qq.com> Date: Fri, 7 Mar 2025 16:07:57 +0800 Subject: [PATCH] check return value for VerifyHeader --- core/blockchain.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/blockchain.go b/core/blockchain.go index bc9eb3b61e..4f9818abe9 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -480,7 +480,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 { + return nil, err + } // Start tx indexer if it's enabled. if txLookupLimit != nil {