aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-07-19 20:03:59 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-07-19 20:03:59 +0800
commit26c0fa1cb0e1dde290297d8537b5c8e17c868e11 (patch)
tree912fd6755736bca6e1b0f4fdf8a590df0f9e4783
parenta38f3740d65c8285dab2372116d83958c23666a4 (diff)
parent1b9ef0e52dea6b02ed070092de31422c4b67fe45 (diff)
downloaddexon-26c0fa1cb0e1dde290297d8537b5c8e17c868e11.tar
dexon-26c0fa1cb0e1dde290297d8537b5c8e17c868e11.tar.gz
dexon-26c0fa1cb0e1dde290297d8537b5c8e17c868e11.tar.bz2
dexon-26c0fa1cb0e1dde290297d8537b5c8e17c868e11.tar.lz
dexon-26c0fa1cb0e1dde290297d8537b5c8e17c868e11.tar.xz
dexon-26c0fa1cb0e1dde290297d8537b5c8e17c868e11.tar.zst
dexon-26c0fa1cb0e1dde290297d8537b5c8e17c868e11.zip
Merge pull request #1480 from obscuren/miner-state-sync
miner: moved state sync
-rw-r--r--miner/worker.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/miner/worker.go b/miner/worker.go
index b93444b1e..90ef79e3f 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -263,6 +263,7 @@ func (self *worker) wait() {
}
block := result.Block
+ self.current.state.Sync()
if self.fullValidation {
if _, err := self.chain.InsertChain(types.Blocks{block}); err != nil {
glog.V(logger.Error).Infoln("mining err", err)
@@ -489,7 +490,6 @@ func (self *worker) commitNewWork() {
// commit state root after all state transitions.
core.AccumulateRewards(self.current.state, header, uncles)
current.state.SyncObjects()
- self.current.state.Sync()
header.Root = current.state.Root()
}