diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 27e0cb4dc..9290ab0f9 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -445,6 +445,20 @@ mod tests { assert_eq!(args.flag_chain, "xyz".to_owned()); } + #[test] + fn should_use_config_if_cli_is_missing() { + let mut config = Config::default(); + let mut footprint = Footprint::default(); + footprint.pruning_history = Some(128); + config.footprint = Some(footprint); + + // when + let args = Args::parse_with_config(&["parity"], config).unwrap(); + + // then + assert_eq!(args.flag_pruning_history, 128); + } + #[test] fn should_parse_full_config() { // given diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt index af8e83f0e..bebdafd97 100644 --- a/parity/cli/usage.txt +++ b/parity/cli/usage.txt @@ -225,7 +225,7 @@ Footprint Options: auto - use the method most recently synced or default to fast if none synced (default: {flag_pruning}). --pruning-history NUM Set a number of recent states to keep when pruning - is active. [default: {flag_pruning_history}]. + is active. (default: {flag_pruning_history}). --cache-size-db MB Override database cache size (default: {flag_cache_size_db}). --cache-size-blocks MB Specify the prefered size of the blockchain cache in megabytes (default: {flag_cache_size_blocks}).