mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-24 20:47:16 +00:00
core/blockchain: Change iterator in procFutureBlocks to use lru.Peek instead of Get (#3655)
This commit is contained in:
parent
9b0af51386
commit
b19e5885fe
@ -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))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user