@@ -39,6 +39,7 @@ use std::cell::{RefCell, RefMut};
3939use std:: collections:: HashMap ;
4040
4141use ccrypto:: BLAKE_NULL_RLP ;
42+ use cdb:: AsHashDB ;
4243use ckey:: { public_to_address, recover, verify_address, Address , NetworkId , Public , Signature } ;
4344use cmerkle:: { Result as TrieResult , TrieError , TrieFactory } ;
4445use ctypes:: errors:: RuntimeError ;
@@ -50,7 +51,6 @@ use ctypes::util::unexpected::Mismatch;
5051use ctypes:: Tracker ;
5152use ctypes:: { BlockNumber , CommonParams , ShardId , TxHash } ;
5253use cvm:: ChainTimeInfo ;
53- use hashdb:: AsHashDB ;
5454use kvdb:: DBTransaction ;
5555#[ cfg( test) ]
5656use primitives:: H160 ;
@@ -1012,7 +1012,7 @@ fn is_active_account(state: &dyn TopStateView, address: &Address) -> TrieResult<
10121012mod tests_state {
10131013 use std:: sync:: Arc ;
10141014
1015- use journaldb :: { self , Algorithm } ;
1015+ use cdb :: { new_journaldb , Algorithm } ;
10161016
10171017 use super :: * ;
10181018 use crate :: tests:: helpers:: { empty_top_state, get_memory_db, get_temp_state, get_temp_state_db} ;
@@ -1077,7 +1077,7 @@ mod tests_state {
10771077 #[ test]
10781078 fn get_from_database ( ) {
10791079 let memory_db = get_memory_db ( ) ;
1080- let jorunal = journaldb :: new ( Arc :: clone ( & memory_db) , Algorithm :: Archive , Some ( 0 ) ) ;
1080+ let jorunal = new_journaldb ( Arc :: clone ( & memory_db) , Algorithm :: Archive , Some ( 0 ) ) ;
10811081 let db = StateDB :: new ( jorunal. boxed_clone ( ) ) ;
10821082 let a = Address :: default ( ) ;
10831083 let root = {
@@ -1108,7 +1108,7 @@ mod tests_state {
11081108 #[ test]
11091109 fn get_from_cache ( ) {
11101110 let memory_db = get_memory_db ( ) ;
1111- let jorunal = journaldb :: new ( Arc :: clone ( & memory_db) , Algorithm :: Archive , Some ( 0 ) ) ;
1111+ let jorunal = new_journaldb ( Arc :: clone ( & memory_db) , Algorithm :: Archive , Some ( 0 ) ) ;
11121112 let mut db = StateDB :: new ( jorunal. boxed_clone ( ) ) ;
11131113 let a = Address :: default ( ) ;
11141114 let root = {
@@ -1180,7 +1180,7 @@ mod tests_state {
11801180 fn remove_from_database ( ) {
11811181 let a = Address :: default ( ) ;
11821182 let memory_db = get_memory_db ( ) ;
1183- let jorunal = journaldb :: new ( Arc :: clone ( & memory_db) , Algorithm :: Archive , Some ( 0 ) ) ;
1183+ let jorunal = new_journaldb ( Arc :: clone ( & memory_db) , Algorithm :: Archive , Some ( 0 ) ) ;
11841184 let mut db = StateDB :: new ( jorunal. boxed_clone ( ) ) ;
11851185 let root = {
11861186 let mut state = empty_top_state ( StateDB :: new ( jorunal) ) ;
0 commit comments