From b7fc85d68ea22a99222ba8535be8ff6410826644 Mon Sep 17 00:00:00 2001 From: Péter Szilágyi Date: Fri, 29 May 2015 23:46:10 +0300 Subject: core: fix #1154, sort out data race accessing the future blocks --- core/chain_manager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/chain_manager.go b/core/chain_manager.go index edf8825f3..3408b5030 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -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) -- cgit