Merge pull request #4632 from ethcore/state-backend

Generic state backend
This commit is contained in:
Robert Habermeier
2017-02-25 16:22:42 +01:00
committed by GitHub
12 changed files with 236 additions and 120 deletions

View File

@@ -349,7 +349,7 @@ pub fn get_temp_state_db() -> GuardedTempResult<StateDB> {
}
}
pub fn get_temp_state() -> GuardedTempResult<State> {
pub fn get_temp_state() -> GuardedTempResult<State<::state_db::StateDB>> {
let temp = RandomTempPath::new();
let journal_db = get_temp_state_db_in(temp.as_path());
@@ -365,7 +365,7 @@ pub fn get_temp_state_db_in(path: &Path) -> StateDB {
StateDB::new(journal_db, 5 * 1024 * 1024)
}
pub fn get_temp_state_in(path: &Path) -> State {
pub fn get_temp_state_in(path: &Path) -> State<::state_db::StateDB> {
let journal_db = get_temp_state_db_in(path);
State::new(journal_db, U256::from(0), Default::default())
}