minimal state backend trait

make state module public
This commit is contained in:
Robert Habermeier
2017-02-21 12:35:21 +01:00
parent ac9716a5ce
commit 1fba73c15e
11 changed files with 167 additions and 117 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())
}