diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-03-02 17:24:27 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-03-02 17:24:27 +0800 |
commit | 5adc461d58a21f52b3a9e7787732005a46b63e65 (patch) | |
tree | 09d816902506bffd0bdb75b9d8adef1283eb0c49 /miner | |
parent | c0bf321ec86118eeec23aab974be55b725f93593 (diff) | |
parent | b534106cc81f4df3d1facb46450c775e2eb617b0 (diff) | |
download | dexon-5adc461d58a21f52b3a9e7787732005a46b63e65.tar dexon-5adc461d58a21f52b3a9e7787732005a46b63e65.tar.gz dexon-5adc461d58a21f52b3a9e7787732005a46b63e65.tar.bz2 dexon-5adc461d58a21f52b3a9e7787732005a46b63e65.tar.lz dexon-5adc461d58a21f52b3a9e7787732005a46b63e65.tar.xz dexon-5adc461d58a21f52b3a9e7787732005a46b63e65.tar.zst dexon-5adc461d58a21f52b3a9e7787732005a46b63e65.zip |
Merge pull request #2267 from karalabe/pending-state-events
core, miner: add PendingStateEvent to track non-log updates.
Diffstat (limited to 'miner')
-rw-r--r-- | miner/worker.go | 11 |
1 files changed, 9 insertions, 2 deletions
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) } } |