Fix up App formatting

(cherry picked from commit ef30943c5c)
This commit is contained in:
Michael Vines
2021-04-11 20:36:27 -07:00
parent 8c0b0f235e
commit 10e8f3ab32

View File

@ -1708,17 +1708,21 @@ pub fn main() {
.arg( .arg(
Arg::with_name("accounts_db_test_hash_calculation") Arg::with_name("accounts_db_test_hash_calculation")
.long("accounts-db-test-hash-calculation") .long("accounts-db-test-hash-calculation")
.help("Enables testing of hash calculation using stores in AccountsHashVerifier. This has a computational cost."), .help("Enables testing of hash calculation using stores in \
AccountsHashVerifier. This has a computational cost."),
) )
.arg( .arg(
Arg::with_name("accounts_db_index_hashing") Arg::with_name("accounts_db_index_hashing")
.long("accounts-db-index-hashing") .long("accounts-db-index-hashing")
.help("Enables the use of the index in hash calculation in AccountsHashVerifier/Accounts Background Service."), .help("Enables the use of the index in hash calculation in \
AccountsHashVerifier/Accounts Background Service."),
) )
.arg( .arg(
Arg::with_name("no_accounts_db_index_hashing") Arg::with_name("no_accounts_db_index_hashing")
.long("no-accounts-db-index-hashing") .long("no-accounts-db-index-hashing")
.help("This is obsolete. See --accounts-db-index-hashing. Disables the use of the index in hash calculation in AccountsHashVerifier/Accounts Background Service."), .help("This is obsolete. See --accounts-db-index-hashing. \
Disables the use of the index in hash calculation in \
AccountsHashVerifier/Accounts Background Service."),
) )
.arg( .arg(
// legacy nop argument // legacy nop argument
@ -1736,70 +1740,70 @@ pub fn main() {
) )
.after_help("The default subcommand is run") .after_help("The default subcommand is run")
.subcommand( .subcommand(
SubCommand::with_name("exit") SubCommand::with_name("exit")
.about("Send an exit request to the validator") .about("Send an exit request to the validator")
.arg( .arg(
Arg::with_name("force") Arg::with_name("force")
.short("f") .short("f")
.long("force") .long("force")
.takes_value(false) .takes_value(false)
.help("Request the validator exit immediately instead of waiting for a restart window") .help("Request the validator exit immediately instead of waiting for a restart window")
) )
.arg( .arg(
Arg::with_name("monitor") Arg::with_name("monitor")
.short("m") .short("m")
.long("monitor") .long("monitor")
.takes_value(false) .takes_value(false)
.help("Monitor the validator after sending the exit request") .help("Monitor the validator after sending the exit request")
) )
.arg( .arg(
Arg::with_name("min_idle_time") Arg::with_name("min_idle_time")
.takes_value(true) .takes_value(true)
.long("min-idle-time") .long("min-idle-time")
.value_name("MINUTES") .value_name("MINUTES")
.validator(is_parsable::<usize>) .validator(is_parsable::<usize>)
.default_value("10") .default_value("10")
.help("Minimum time that the validator should not be leader before restarting") .help("Minimum time that the validator should not be leader before restarting")
) )
) )
.subcommand( .subcommand(
SubCommand::with_name("init") SubCommand::with_name("init")
.about("Initialize the ledger directory then exit") .about("Initialize the ledger directory then exit")
) )
.subcommand( .subcommand(
SubCommand::with_name("monitor") SubCommand::with_name("monitor")
.about("Monitor the validator") .about("Monitor the validator")
) )
.subcommand( .subcommand(
SubCommand::with_name("run") SubCommand::with_name("run")
.about("Run the validator") .about("Run the validator")
) )
.subcommand( .subcommand(
SubCommand::with_name("set-log-filter") SubCommand::with_name("set-log-filter")
.about("Adjust the validator log filter") .about("Adjust the validator log filter")
.arg( .arg(
Arg::with_name("filter") Arg::with_name("filter")
.takes_value(true) .takes_value(true)
.index(1) .index(1)
.help("New filter using the same format as the RUST_LOG environment variable") .help("New filter using the same format as the RUST_LOG environment variable")
) )
.after_help("Note: the new filter only applies to the currently running validator instance") .after_help("Note: the new filter only applies to the currently running validator instance")
) )
.subcommand( .subcommand(
SubCommand::with_name("wait-for-restart-window") SubCommand::with_name("wait-for-restart-window")
.about("Monitor the validator for a good time to restart") .about("Monitor the validator for a good time to restart")
.arg( .arg(
Arg::with_name("min_idle_time") Arg::with_name("min_idle_time")
.takes_value(true) .takes_value(true)
.index(1) .index(1)
.validator(is_parsable::<usize>) .validator(is_parsable::<usize>)
.value_name("MINUTES") .value_name("MINUTES")
.default_value("10") .default_value("10")
.help("Minimum time that the validator should not be leader before restarting") .help("Minimum time that the validator should not be leader before restarting")
) )
.after_help("Note: If this command exits with a non-zero status \ .after_help("Note: If this command exits with a non-zero status \
then this not a good time for a restart") then this not a good time for a restart")
) )
.get_matches(); .get_matches();
let ledger_path = PathBuf::from(matches.value_of("ledger_path").unwrap()); let ledger_path = PathBuf::from(matches.value_of("ledger_path").unwrap());