good morning!!!!

Skip to content
Snippets Groups Projects
Commit a906a849 authored by Felix Lange's avatar Felix Lange
Browse files

Merge pull request #1155 from karalabe/fix-chainmanager-datarace

core: fix #1154, sort out data race accessing the future blocks
parents 0e703d92 b7fc85d6
Branches
Tags
No related merge requests found
...@@ -522,9 +522,9 @@ type queueEvent struct { ...@@ -522,9 +522,9 @@ type queueEvent struct {
} }
func (self *ChainManager) procFutureBlocks() { func (self *ChainManager) procFutureBlocks() {
blocks := make([]*types.Block, len(self.futureBlocks.blocks)) blocks := []*types.Block{}
self.futureBlocks.Each(func(i int, block *types.Block) { self.futureBlocks.Each(func(i int, block *types.Block) {
blocks[i] = block blocks = append(blocks, block)
}) })
types.BlockBy(types.Number).Sort(blocks) types.BlockBy(types.Number).Sort(blocks)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment