Skip to content

Commit

Permalink
fix tests compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
ordian committed Jun 20, 2018
1 parent 1cd6b76 commit 3e752de
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions ethcore/light/src/client/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,12 @@ mod tests {
use std::time::Duration;
use parking_lot::Mutex;
use ethcore::test_helpers;
use blockchain::{BlockChainDB, BlockChainDBHandler};
use ethcore::client::ClientConfig;
use ethcore::db::NUM_COLUMNS;

use tempdir::TempDir;

use ethcore::client::ClientConfig;
use kvdb::Error;
use std::path::Path;
use kvdb_rocksdb::{Database, DatabaseConfig, CompactionProfile};
use kvdb_memorydb;
use kvdb_rocksdb::{DatabaseConfig, CompactionProfile};

#[test]
fn it_works() {
Expand All @@ -213,20 +210,7 @@ mod tests {
client_db_config.compaction = CompactionProfile::auto(&client_path);
client_db_config.wal = client_config.db_wal;

struct RestorationDBHandler {
config: DatabaseConfig,
}

impl BlockChainDBHandler for RestorationDBHandler {
fn open(&self, db_path: &Path) -> Result<Arc<KeyValueDB>, Error> {
Ok(Arc::new(Database::open(&self.config, &db_path.to_string_lossy())?))
}
}

let restoration_db_handler = Box::new(RestorationDBHandler {
config: client_db_config,
});

let restoration_db_handler = test_helpers::restoration_db_handler(client_db_config);
let db = test_helpers::new_db();
let spec = Spec::new_test();
let cache = Arc::new(Mutex::new(Cache::new(Default::default(), Duration::from_secs(6 * 3600))));
Expand Down

0 comments on commit 3e752de

Please sign in to comment.