Merge pull request #32 from astriaorg/noot/fix-genesis

fix: set genesis block as head/safe/final
This commit is contained in:
noot 2023-10-16 21:21:53 +02:00 committed by GitHub
commit d86b964ce3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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