aboutsummaryrefslogtreecommitdiffstats
path: root/tests/state_test_util.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-08-18 20:14:45 +0800
committerFelix Lange <fjl@twurst.com>2015-09-23 04:57:37 +0800
commita2d5a60418e70ce56112381dffdd121cc678a1b6 (patch)
treec9733cb16b7ca5bac98d6ae11254def5a48aafb8 /tests/state_test_util.go
parent565d9f2306d19f63be6a6e1b8fc480af8dca9617 (diff)
downloaddexon-a2d5a60418e70ce56112381dffdd121cc678a1b6.tar
dexon-a2d5a60418e70ce56112381dffdd121cc678a1b6.tar.gz
dexon-a2d5a60418e70ce56112381dffdd121cc678a1b6.tar.bz2
dexon-a2d5a60418e70ce56112381dffdd121cc678a1b6.tar.lz
dexon-a2d5a60418e70ce56112381dffdd121cc678a1b6.tar.xz
dexon-a2d5a60418e70ce56112381dffdd121cc678a1b6.tar.zst
dexon-a2d5a60418e70ce56112381dffdd121cc678a1b6.zip
core, core/state: batch-based state sync
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 086822461..669e90a1e 100644
--- a/tests/state_test_util.go
+++ b/tests/state_test_util.go
@@ -200,9 +200,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
@@ -246,7 +246,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
}