From ea00f689ec0a2fffbea2cc7156ef7b183d17382f Mon Sep 17 00:00:00 2001 From: zelig Date: Thu, 2 Jul 2015 16:32:20 +0100 Subject: [PATCH] post chainheadevent in miner/worker --- miner/worker.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/miner/worker.go b/miner/worker.go index 75f2cc590f..67353196b7 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -275,13 +275,13 @@ func (self *worker) wait() { glog.V(logger.Info).Infof("🔨 Mined %sblock (#%v / %x). %s", stale, block.Number(), block.Hash().Bytes()[:4], confirm) // broadcast before waiting for validation - go func() { + go func(block *types.Block, logs state.Logs) { self.mux.Post(core.NewMinedBlockEvent{block}) - self.mux.Post(core.ChainEvent{block, block.Hash(), self.current.state.Logs()}) + self.mux.Post(core.ChainEvent{block, block.Hash(), logs}) if stat == core.CanonStatTy { self.mux.Post(core.ChainHeadEvent{block}) } - }() + }(block, self.current.state.Logs()) self.commitNewWork() }