core, miner, tests: renamed state methods

* Update => SyncIntermediate
* Added SyncObjects

SyncIntermediate only updates whatever has changed, but, as a side
effect, requires much more disk space.

SyncObjects will only sync whatever is required for a block and will not
save intermediate state to disk. As drawback this requires more time
when more txs come in.
This commit is contained in:
Jeffrey Wilcke
2015-07-01 12:07:14 +02:00
parent 08caeedd84
commit ab16ce70fc
8 changed files with 13 additions and 11 deletions

View File

@ -453,7 +453,7 @@ func (self *worker) commitNewWork() {
if atomic.LoadInt32(&self.mining) == 1 {
// commit state root after all state transitions.
core.AccumulateRewards(self.current.state, header, uncles)
current.state.Update()
current.state.SyncObjects()
self.current.state.Sync()
header.Root = current.state.Root()
}