mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-27 16:17:22 +00:00
core: fix #1154, sort out data race accessing the future blocks
This commit is contained in:
parent
9f467c387a
commit
b7fc85d68e
1 changed files with 2 additions and 2 deletions
|
|
@ -522,9 +522,9 @@ type queueEvent struct {
|
|||
}
|
||||
|
||||
func (self *ChainManager) procFutureBlocks() {
|
||||
blocks := make([]*types.Block, len(self.futureBlocks.blocks))
|
||||
blocks := []*types.Block{}
|
||||
self.futureBlocks.Each(func(i int, block *types.Block) {
|
||||
blocks[i] = block
|
||||
blocks = append(blocks, block)
|
||||
})
|
||||
|
||||
types.BlockBy(types.Number).Sort(blocks)
|
||||
|
|
|
|||
Loading…
Reference in a new issue