mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +00:00
core: fix variable shadowing, close XFN-104 (#1649)
This commit is contained in:
parent
96fbe67bf5
commit
96d39a83e1
1 changed files with 1 additions and 2 deletions
|
|
@ -2209,7 +2209,6 @@ func (bc *BlockChain) getResultBlock(block *types.Block, verifiedM2 bool) (*Resu
|
||||||
|
|
||||||
// UpdateBlocksHashCache update BlocksHashCache by block number
|
// UpdateBlocksHashCache update BlocksHashCache by block number
|
||||||
func (bc *BlockChain) UpdateBlocksHashCache(block *types.Block) []common.Hash {
|
func (bc *BlockChain) UpdateBlocksHashCache(block *types.Block) []common.Hash {
|
||||||
var hashArr []common.Hash
|
|
||||||
blockNumber := block.Number().Uint64()
|
blockNumber := block.Number().Uint64()
|
||||||
cached, ok := bc.blocksHashCache.Get(blockNumber)
|
cached, ok := bc.blocksHashCache.Get(blockNumber)
|
||||||
|
|
||||||
|
|
@ -2221,7 +2220,7 @@ func (bc *BlockChain) UpdateBlocksHashCache(block *types.Block) []common.Hash {
|
||||||
return hashArr
|
return hashArr
|
||||||
}
|
}
|
||||||
|
|
||||||
hashArr = []common.Hash{
|
hashArr := []common.Hash{
|
||||||
block.Hash(),
|
block.Hash(),
|
||||||
}
|
}
|
||||||
bc.blocksHashCache.Add(blockNumber, hashArr)
|
bc.blocksHashCache.Add(blockNumber, hashArr)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue