From 80f98bc8b7a43275ef172119b17693e6b534850d Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Fri, 2 Dec 2016 18:36:00 +0100 Subject: [PATCH] fix tests --- parity/cli/config.full.toml | 2 ++ parity/cli/config.toml | 1 + parity/cli/mod.rs | 12 ++++++++++-- parity/configuration.rs | 2 ++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/parity/cli/config.full.toml b/parity/cli/config.full.toml index fcd9a9712..ffb0848ea 100644 --- a/parity/cli/config.full.toml +++ b/parity/cli/config.full.toml @@ -94,6 +94,8 @@ cache_size = 128 # Overrides above caches with total size fast_and_loose = false db_compaction = "ssd" fat_db = "auto" +scale_verifiers = true +num_verifiers = 6 [snapshots] disable_periodic = false diff --git a/parity/cli/config.toml b/parity/cli/config.toml index c9bd563a8..02b4a9577 100644 --- a/parity/cli/config.toml +++ b/parity/cli/config.toml @@ -57,6 +57,7 @@ cache_size_queue = 100 cache_size_state = 25 db_compaction = "ssd" fat_db = "off" +scale_verifiers = false, [snapshots] disable_periodic = true diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 30b273b38..1d1bcc4c0 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -242,8 +242,10 @@ usage! { or |c: &Config| otry!(c.footprint).db_compaction.clone(), flag_fat_db: String = "auto", or |c: &Config| otry!(c.footprint).fat_db.clone(), - flag_scale_verifiers: bool = false, or |_| None, - flag_num_verifiers: Option = None, or |_| None, + flag_scale_verifiers: bool = false, + or |c: &Config| otry!(c.footprint).scale_verifiers.clone(), + flag_num_verifiers: Option = None, + or |c: &Config| otry!(c.footprint).num_verifiers.clone().map(Some), // -- Import/Export Options flag_from: String = "1", or |_| None, @@ -404,6 +406,8 @@ struct Footprint { cache_size_state: Option, db_compaction: Option, fat_db: Option, + scale_verifiers: Option, + num_verifiers: Option, } #[derive(Default, Debug, PartialEq, RustcDecodable)] @@ -604,6 +608,8 @@ mod tests { flag_fast_and_loose: false, flag_db_compaction: "ssd".into(), flag_fat_db: "auto".into(), + flag_scale_verifiers: true, + flag_num_verifiers: Some(6), // -- Import/Export Options flag_from: "1".into(), @@ -773,6 +779,8 @@ mod tests { cache_size_state: Some(25), db_compaction: Some("ssd".into()), fat_db: Some("off".into()), + scale_verifiers: Some(false), + num_verifiers: None, }), snapshots: Some(Snapshots { disable_periodic: Some(true), diff --git a/parity/configuration.rs b/parity/configuration.rs index 7b8100bbb..55783e5b2 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -813,6 +813,7 @@ mod tests { vm_type: VMType::Interpreter, check_seal: true, with_color: !cfg!(windows), + verifier_settings: Default::default(), }))); } @@ -936,6 +937,7 @@ mod tests { no_periodic_snapshot: false, check_seal: true, download_old_blocks: true, + verifier_settings: Default::default(), })); }