aboutsummaryrefslogtreecommitdiffstats
path: root/tests/state_test_util.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-10-01 19:34:38 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-10-01 19:34:38 +0800
commit49ae53850622f3ea051184dccc867fbfec4c9ecb (patch)
tree669f4b161773c9b95c6631e83a3c34d446c33fef /tests/state_test_util.go
parent581c0901af22d678aedd9eefae6144582c23e1a0 (diff)
parentc1a352c1085baa5c5f7650d331603bbb5532dea4 (diff)
downloadgo-tangerine-49ae53850622f3ea051184dccc867fbfec4c9ecb.tar.gz
go-tangerine-49ae53850622f3ea051184dccc867fbfec4c9ecb.tar.zst
go-tangerine-49ae53850622f3ea051184dccc867fbfec4c9ecb.zip
Merge pull request #1405 from fjl/lean-trie
core, trie: new trie
Diffstat (limited to 'tests/state_test_util.go')
-rw-r--r--tests/state_test_util.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/state_test_util.go b/tests/state_test_util.go
index 95ecdd0a8..3d8dfca31 100644
--- a/tests/state_test_util.go
+++ b/tests/state_test_util.go
@@ -201,9 +201,9 @@ func runStateTest(test VmTest) error {
}
}
- statedb.Sync()
- if common.HexToHash(test.PostStateRoot) != statedb.Root() {
- return fmt.Errorf("Post state root error. Expected %s, got %x", test.PostStateRoot, statedb.Root())
+ root, _ := statedb.Commit()
+ if common.HexToHash(test.PostStateRoot) != root {
+ return fmt.Errorf("Post state root error. Expected %s, got %x", test.PostStateRoot, root)
}
// check logs
@@ -247,7 +247,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.SyncObjects()
+ statedb.Commit()
return ret, vmenv.state.Logs(), vmenv.Gas, err
}