core, core/state: batch-based state sync
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user