mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Merge pull request #32 from astriaorg/noot/fix-genesis
fix: set genesis block as head/safe/final
This commit is contained in:
commit
d86b964ce3
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