core: fix review concerns

This commit is contained in:
Martin Holst Swende 2018-02-23 11:28:29 +01:00
parent b1d0280cfc
commit 9d2451509c
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -244,7 +244,7 @@ func (bc *BlockChain) loadLastState() error {
}
// Issue a status log for the user
currentFastBlock := bc.currentFastBlock.Load().(*types.Block)
currentFastBlock := bc.CurrentFastBlock()
headerTd := bc.GetTd(currentHeader.Hash(), currentHeader.Number.Uint64())
blockTd := bc.GetTd(currentBlock.Hash(), currentBlock.NumberU64())
@ -334,7 +334,7 @@ func (bc *BlockChain) FastSyncCommitHead(hash common.Hash) error {
// GasLimit returns the gas limit of the current HEAD block.
func (bc *BlockChain) GasLimit() uint64 {
return bc.currentBlock.Load().(*types.Block).GasLimit()
return bc.CurrentBlock().GasLimit()
}
// CurrentBlock retrieves the current head block of the canonical chain. The