mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
core: initialize current block/fastblock atomics to nil (19352)
This commit is contained in:
parent
a1d6e839c0
commit
3856e16d8c
1 changed files with 4 additions and 0 deletions
|
|
@ -267,6 +267,10 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, chainConfig *par
|
|||
return nil, ErrNoGenesis
|
||||
}
|
||||
|
||||
var nilBlock *types.Block
|
||||
bc.currentBlock.Store(nilBlock)
|
||||
bc.currentFastBlock.Store(nilBlock)
|
||||
|
||||
// Update chain info data metrics
|
||||
chainInfoGauge.Update(metrics.GaugeInfoValue{"chain_id": bc.chainConfig.ChainId.String()})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue