Fixing config values for pruning_history (#2918)

This commit is contained in:
Tomasz Drwięga 2016-10-27 16:56:18 +02:00 committed by Arkadiy Paronyan
parent 7c6112e9f0
commit 8cef517788
2 changed files with 15 additions and 1 deletions

View File

@ -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

View File

@ -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}).