Disable WAL (#1765)

* Disable WAL

* Make WAL optional

* Fix tests.

* Update cli.rs
This commit is contained in:
Arkadiy Paronyan
2016-07-29 15:36:00 +02:00
committed by GitHub
parent 29e07755e9
commit 57faa37623
10 changed files with 29 additions and 5 deletions

View File

@@ -176,6 +176,7 @@ impl Client {
let mut db_config = DatabaseConfig::with_columns(DB_NO_OF_COLUMNS);
db_config.cache_size = config.db_cache_size;
db_config.compaction = config.db_compaction.compaction_profile();
db_config.wal = config.db_wal;
let db = Arc::new(Database::open(&db_config, &path.to_str().unwrap()).expect("Error opening database"));
let chain = Arc::new(BlockChain::new(config.blockchain, &gb, db.clone()));

View File

@@ -101,6 +101,8 @@ pub struct ClientConfig {
pub db_cache_size: Option<usize>,
/// State db compaction profile
pub db_compaction: DatabaseCompactionProfile,
/// Should db have WAL enabled?
pub db_wal: bool,
/// Operating mode
pub mode: Mode,
/// Type of block verifier used by client.