JournalDB -> Box<JournalDB>, and it's a trait.
This commit is contained in:
@@ -250,9 +250,9 @@ pub fn generate_dummy_empty_blockchain() -> GuardedTempResult<BlockChain> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_temp_journal_db() -> GuardedTempResult<JournalDB> {
|
||||
pub fn get_temp_journal_db() -> GuardedTempResult<Box<JournalDB + Send>> {
|
||||
let temp = RandomTempPath::new();
|
||||
let journal_db = JournalDB::new(temp.as_str());
|
||||
let journal_db = Box::new(OptionOneDB::new(temp.as_str()));
|
||||
GuardedTempResult {
|
||||
_temp: temp,
|
||||
result: Some(journal_db)
|
||||
@@ -268,8 +268,8 @@ pub fn get_temp_state() -> GuardedTempResult<State> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_temp_journal_db_in(path: &Path) -> JournalDB {
|
||||
JournalDB::new(path.to_str().unwrap())
|
||||
pub fn get_temp_journal_db_in(path: &Path) -> Box<JournalDB + Send> {
|
||||
Box::new(OptionOneDB::new(path.to_str().unwrap()))
|
||||
}
|
||||
|
||||
pub fn get_temp_state_in(path: &Path) -> State {
|
||||
|
||||
Reference in New Issue
Block a user