Skip to content

Commit

Permalink
core: initialize current block/fastblock atomics to nil, fix ethereum…
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Mar 29, 2019
1 parent 86e7790 commit eb6b3db
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, chainConfig *par
if bc.genesisBlock == nil {
return nil, ErrNoGenesis
}
var nilBlock *types.Block
bc.currentBlock.Store(nilBlock)
bc.currentFastBlock.Store(nilBlock)

if err := bc.loadLastState(); err != nil {
return nil, err
}
Expand Down

0 comments on commit eb6b3db

Please sign in to comment.