core: fix error in atomic assignment

This commit is contained in:
Martin Holst Swende 2018-02-23 16:51:48 +01:00
parent 9d2451509c
commit 9fa6dfe81c
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -236,7 +236,7 @@ func (bc *BlockChain) loadLastState() error {
bc.hc.SetCurrentHeader(currentHeader)
// Restore the last known head fast block
bc.currentFastBlock = bc.currentBlock
bc.currentFastBlock.Store(currentBlock)
if head := GetHeadFastBlockHash(bc.db); head != (common.Hash{}) {
if block := bc.GetBlockByHash(head); block != nil {
bc.currentFastBlock.Store(block)