diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-07-16 20:19:27 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-07-16 20:19:27 +0800 |
commit | 1b9ef0e52dea6b02ed070092de31422c4b67fe45 (patch) | |
tree | f4d34403e12206d10ba0052b31ecc249badcd9c9 /miner | |
parent | a75b95b87612691a3e8f709e8c5739a2e7ac8b76 (diff) | |
download | go-tangerine-1b9ef0e52dea6b02ed070092de31422c4b67fe45.tar go-tangerine-1b9ef0e52dea6b02ed070092de31422c4b67fe45.tar.gz go-tangerine-1b9ef0e52dea6b02ed070092de31422c4b67fe45.tar.bz2 go-tangerine-1b9ef0e52dea6b02ed070092de31422c4b67fe45.tar.lz go-tangerine-1b9ef0e52dea6b02ed070092de31422c4b67fe45.tar.xz go-tangerine-1b9ef0e52dea6b02ed070092de31422c4b67fe45.tar.zst go-tangerine-1b9ef0e52dea6b02ed070092de31422c4b67fe45.zip |
miner: moved state sync
Moved the state sync so it only syncs the state when the block mining yield a possitive result
Diffstat (limited to 'miner')
-rw-r--r-- | miner/worker.go | 2 |
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() } |