mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
core/blockchain: Change iterator in procFutureBlocks to use lru.Peek instead of Get
This commit is contained in:
parent
fa99986143
commit
cb3587f377
1 changed files with 1 additions and 1 deletions
|
|
@ -592,7 +592,7 @@ func (bc *BlockChain) Stop() {
|
|||
func (self *BlockChain) procFutureBlocks() {
|
||||
blocks := make([]*types.Block, 0, self.futureBlocks.Len())
|
||||
for _, hash := range self.futureBlocks.Keys() {
|
||||
if block, exist := self.futureBlocks.Get(hash); exist {
|
||||
if block, exist := self.futureBlocks.Peek(hash); exist {
|
||||
blocks = append(blocks, block.(*types.Block))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue