mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
set genesis block as head/safe/final
This commit is contained in:
parent
d2ce6566be
commit
e4cf34fe26
1 changed files with 4 additions and 4 deletions
|
|
@ -289,10 +289,10 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis
|
||||||
return nil, ErrNoGenesis
|
return nil, ErrNoGenesis
|
||||||
}
|
}
|
||||||
|
|
||||||
bc.currentBlock.Store(nil)
|
bc.currentBlock.Store(bc.genesisBlock.Header())
|
||||||
bc.currentSnapBlock.Store(nil)
|
bc.currentSnapBlock.Store(bc.genesisBlock.Header())
|
||||||
bc.currentFinalBlock.Store(nil)
|
bc.currentFinalBlock.Store(bc.genesisBlock.Header())
|
||||||
bc.currentSafeBlock.Store(nil)
|
bc.currentSafeBlock.Store(bc.genesisBlock.Header())
|
||||||
|
|
||||||
// If Geth is initialized with an external ancient store, re-initialize the
|
// If Geth is initialized with an external ancient store, re-initialize the
|
||||||
// missing chain indexes and chain flags. This procedure can survive crash
|
// missing chain indexes and chain flags. This procedure can survive crash
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue