From 35a0295376f112a57b2b2ba2137a2bc87cdb2743 Mon Sep 17 00:00:00 2001 From: Brooks Date: Fri, 6 Oct 2023 07:51:49 -0400 Subject: [PATCH] Improves error text when snapshot intervals are incompatible (#33551) --- validator/src/cli.rs | 3 ++- validator/src/main.rs | 9 +++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/validator/src/cli.rs b/validator/src/cli.rs index 403a922c4..72e82ca13 100644 --- a/validator/src/cli.rs +++ b/validator/src/cli.rs @@ -468,7 +468,8 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> { .value_name("NUMBER") .takes_value(true) .default_value(&default_args.full_snapshot_archive_interval_slots) - .help("Number of slots between generating full snapshots") + .help("Number of slots between generating full snapshots. \ + Must be a multiple of the incremental snapshot interval.") ) .arg( Arg::with_name("maximum_full_snapshots_to_retain") diff --git a/validator/src/main.rs b/validator/src/main.rs index 8d37486d7..b97789061 100644 --- a/validator/src/main.rs +++ b/validator/src/main.rs @@ -1588,17 +1588,14 @@ pub fn main() { validator_config.accounts_hash_interval_slots, ) { eprintln!("Invalid snapshot configuration provided: snapshot intervals are incompatible. \ - \n\t- full snapshot interval MUST be a multiple of accounts hash interval (if enabled) \ - \n\t- incremental snapshot interval MUST be a multiple of accounts hash interval (if enabled) \ + \n\t- full snapshot interval MUST be a multiple of incremental snapshot interval (if enabled) \ \n\t- full snapshot interval MUST be larger than incremental snapshot interval (if enabled) \ \nSnapshot configuration values: \ \n\tfull snapshot interval: {} \ - \n\tincremental snapshot interval: {} \ - \n\taccounts hash interval: {}", + \n\tincremental snapshot interval: {}", if full_snapshot_archive_interval_slots == DISABLED_SNAPSHOT_ARCHIVE_INTERVAL { "disabled".to_string() } else { full_snapshot_archive_interval_slots.to_string() }, if incremental_snapshot_archive_interval_slots == DISABLED_SNAPSHOT_ARCHIVE_INTERVAL { "disabled".to_string() } else { incremental_snapshot_archive_interval_slots.to_string() }, - validator_config.accounts_hash_interval_slots); - + ); exit(1); }