Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Fixing config values for pruning_history (#2918)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomusdrw authored and arkpar committed Oct 27, 2016
1 parent 7c6112e commit 8cef517
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions parity/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion parity/cli/usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}).
Expand Down

0 comments on commit 8cef517

Please sign in to comment.