Remove light client

This commit is contained in:
Artem Vorotnikov
2020-08-13 19:25:19 +03:00
parent 2ab8c72ce3
commit 194101ed00
94 changed files with 59 additions and 44043 deletions

View File

@@ -19,7 +19,7 @@
#[path = "rocksdb/mod.rs"]
mod impls;
pub use self::impls::{migrate, open_db, restoration_db_handler};
pub use self::impls::{migrate, restoration_db_handler};
#[cfg(feature = "secretstore")]
pub use self::impls::open_secretstore_db;

View File

@@ -23,13 +23,10 @@ use self::{
kvdb_rocksdb::{Database, DatabaseConfig},
};
use blooms_db;
use ethcore::client::{ClientConfig, DatabaseCompactionProfile};
use ethcore_db::NUM_COLUMNS;
use ethcore::client::ClientConfig;
use kvdb::KeyValueDB;
use std::{fs, io, path::Path, sync::Arc};
use cache::CacheConfig;
mod blooms;
mod helpers;
mod migration;
@@ -93,23 +90,6 @@ pub fn restoration_db_handler(
})
}
/// Open a new main DB.
pub fn open_db(
client_path: &str,
cache_config: &CacheConfig,
compaction: &DatabaseCompactionProfile,
) -> io::Result<Arc<dyn BlockChainDB>> {
let path = Path::new(client_path);
let db_config = DatabaseConfig {
memory_budget: Some(cache_config.blockchain() as usize * 1024 * 1024),
compaction: helpers::compaction_profile(&compaction, path),
..DatabaseConfig::with_columns(NUM_COLUMNS)
};
open_database(client_path, &db_config)
}
pub fn open_database(
client_path: &str,
config: &DatabaseConfig,