aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-07-01 18:07:14 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-07-04 08:51:36 +0800
commitab16ce70fc68d9ab1b7d8cda57c180b4785cab6a (patch)
treeb6d294b8fbe8ba7f34a9f78f676ca99758a58bf5 /tests
parent08caeedd842526373d30a929e63101a5fe7fda55 (diff)
downloaddexon-ab16ce70fc68d9ab1b7d8cda57c180b4785cab6a.tar
dexon-ab16ce70fc68d9ab1b7d8cda57c180b4785cab6a.tar.gz
dexon-ab16ce70fc68d9ab1b7d8cda57c180b4785cab6a.tar.bz2
dexon-ab16ce70fc68d9ab1b7d8cda57c180b4785cab6a.tar.lz
dexon-ab16ce70fc68d9ab1b7d8cda57c180b4785cab6a.tar.xz
dexon-ab16ce70fc68d9ab1b7d8cda57c180b4785cab6a.tar.zst
dexon-ab16ce70fc68d9ab1b7d8cda57c180b4785cab6a.zip
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/block_test_util.go2
-rw-r--r--tests/state_test_util.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/block_test_util.go b/tests/block_test_util.go
index 67f6a1d18..3b20da492 100644
--- a/tests/block_test_util.go
+++ b/tests/block_test_util.go
@@ -215,7 +215,7 @@ func (t *BlockTest) InsertPreState(ethereum *eth.Ethereum) (*state.StateDB, erro
}
}
// sync objects to trie
- statedb.Update()
+ statedb.SyncObjects()
// sync trie to disk
statedb.Sync()
diff --git a/tests/state_test_util.go b/tests/state_test_util.go
index 2f3d497be..7f1a22ac0 100644
--- a/tests/state_test_util.go
+++ b/tests/state_test_util.go
@@ -175,7 +175,7 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.
if core.IsNonceErr(err) || core.IsInvalidTxErr(err) || state.IsGasLimitErr(err) {
statedb.Set(snapshot)
}
- statedb.Update()
+ statedb.SyncObjects()
return ret, vmenv.state.Logs(), vmenv.Gas, err
}