Use DB backend in test client (#1779)

* use DB backend in test client

* Update core/client/db/src/lib.rs

Co-Authored-By: svyatonik <svyatonik@gmail.com>
This commit is contained in:
Svyatoslav Nikolsky
2019-02-15 13:03:22 +03:00
committed by Bastian Köcher
parent cf71350186
commit 6a6c3155a6
9 changed files with 189 additions and 37 deletions
+3 -3
View File
@@ -72,8 +72,8 @@ impl<Block> LightStorage<Block>
Self::from_kvdb(db as Arc<_>)
}
#[cfg(test)]
pub(crate) fn new_test() -> Self {
#[cfg(any(test, feature = "test-helpers"))]
pub fn new_test() -> Self {
use utils::NUM_COLUMNS;
let db = Arc::new(::kvdb_memorydb::create(NUM_COLUMNS));
@@ -493,7 +493,7 @@ impl<Block> LightBlockchainStorage<Block> for LightStorage<Block>
}
fn cache(&self) -> Option<&BlockchainCache<Block>> {
None
Some(&self.cache)
}
}