core: handle engine VerifyHeader error in NewBlockChain

Signed-off-by: meows <b5c6@protonmail.com>
This commit is contained in:
meows 2020-03-20 06:55:04 -05:00
parent e943f07a85
commit 565074892b
No known key found for this signature in database
GPG key ID: 5786AEA5C8D5A520

View file

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