From b19e5885fe2d3f8d563a6d04879b2be11f52b5c5 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Sat, 18 Feb 2017 09:27:21 +0100 Subject: [PATCH] core/blockchain: Change iterator in procFutureBlocks to use lru.Peek instead of Get (#3655) --- core/blockchain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/blockchain.go b/core/blockchain.go index ae4fbbcd7..cc0ddf1ed 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -597,7 +597,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)) } }