aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2017-02-18 16:27:21 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2017-02-18 16:27:21 +0800
commitb19e5885fe2d3f8d563a6d04879b2be11f52b5c5 (patch)
tree36c95e6f0264559bbc5315b4ee98479fbe8cba91
parent9b0af513867fad4aeb3516e4711dd0ea4f5bc90c (diff)
downloaddexon-b19e5885fe2d3f8d563a6d04879b2be11f52b5c5.tar
dexon-b19e5885fe2d3f8d563a6d04879b2be11f52b5c5.tar.gz
dexon-b19e5885fe2d3f8d563a6d04879b2be11f52b5c5.tar.bz2
dexon-b19e5885fe2d3f8d563a6d04879b2be11f52b5c5.tar.lz
dexon-b19e5885fe2d3f8d563a6d04879b2be11f52b5c5.tar.xz
dexon-b19e5885fe2d3f8d563a6d04879b2be11f52b5c5.tar.zst
dexon-b19e5885fe2d3f8d563a6d04879b2be11f52b5c5.zip
core/blockchain: Change iterator in procFutureBlocks to use lru.Peek instead of Get (#3655)
-rw-r--r--core/blockchain.go2
1 files changed, 1 insertions, 1 deletions
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))
}
}