Skip to content

Commit

Permalink
set genesis block as head/safe/final
Browse files Browse the repository at this point in the history
  • Loading branch information
noot committed Oct 16, 2023
1 parent d2ce656 commit e4cf34f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,10 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, genesis *Genesis
return nil, ErrNoGenesis
}

bc.currentBlock.Store(nil)
bc.currentSnapBlock.Store(nil)
bc.currentFinalBlock.Store(nil)
bc.currentSafeBlock.Store(nil)
bc.currentBlock.Store(bc.genesisBlock.Header())
bc.currentSnapBlock.Store(bc.genesisBlock.Header())
bc.currentFinalBlock.Store(bc.genesisBlock.Header())
bc.currentSafeBlock.Store(bc.genesisBlock.Header())

// If Geth is initialized with an external ancient store, re-initialize the
// missing chain indexes and chain flags. This procedure can survive crash
Expand Down

0 comments on commit e4cf34f

Please sign in to comment.