good morning!!!!

Skip to content
Snippets Groups Projects
Commit b19e5885 authored by Martin Holst Swende's avatar Martin Holst Swende Committed by Jeffrey Wilcke
Browse files

core/blockchain: Change iterator in procFutureBlocks to use lru.Peek instead of Get (#3655)

parent 9b0af513
Branches
Tags
No related merge requests found
...@@ -597,7 +597,7 @@ func (bc *BlockChain) Stop() { ...@@ -597,7 +597,7 @@ func (bc *BlockChain) Stop() {
func (self *BlockChain) procFutureBlocks() { func (self *BlockChain) procFutureBlocks() {
blocks := make([]*types.Block, 0, self.futureBlocks.Len()) blocks := make([]*types.Block, 0, self.futureBlocks.Len())
for _, hash := range self.futureBlocks.Keys() { 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)) blocks = append(blocks, block.(*types.Block))
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment