From b534106cc81f4df3d1facb46450c775e2eb617b0 Mon Sep 17 00:00:00 2001 From: Péter Szilágyi Date: Fri, 26 Feb 2016 18:48:39 +0200 Subject: core, miner: add PendingStateEvent to track non-log updates --- miner/worker.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'miner') diff --git a/miner/worker.go b/miner/worker.go index 71f22ef1c..f3e95cb5f 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -649,8 +649,15 @@ func (env *Work) commitTransactions(mux *event.TypeMux, transactions types.Trans coalescedLogs = append(coalescedLogs, logs...) } } - if len(coalescedLogs) > 0 { - go mux.Post(core.PendingLogsEvent{Logs: coalescedLogs}) + if len(coalescedLogs) > 0 || env.tcount > 0 { + go func(logs vm.Logs, tcount int) { + if len(logs) > 0 { + mux.Post(core.PendingLogsEvent{Logs: logs}) + } + if tcount > 0 { + mux.Post(core.PendingStateEvent{}) + } + }(coalescedLogs, env.tcount) } } -- cgit