mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core: handle engine VerifyHeader error in NewBlockChain
Signed-off-by: meows <b5c6@protonmail.com>
This commit is contained in:
parent
e943f07a85
commit
565074892b
1 changed files with 3 additions and 1 deletions
|
|
@ -245,7 +245,9 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, chainConfig *par
|
||||||
// The first thing the node will do is reconstruct the verification data for
|
// 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
|
// the head block (ethash cache or clique voting snapshot). Might as well do
|
||||||
// it in advance.
|
// it in advance.
|
||||||
bc.engine.VerifyHeader(bc, bc.CurrentHeader(), true)
|
if err := bc.engine.VerifyHeader(bc, bc.CurrentHeader(), true); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
if frozen, err := bc.db.Ancients(); err == nil && frozen > 0 {
|
if frozen, err := bc.db.Ancients(); err == nil && frozen > 0 {
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue