Tidy grpc and misc things

This commit is contained in:
Paul Hauner
2019-11-23 12:16:41 +11:00
parent 9e5a9cefe2
commit ef4e12da51
9 changed files with 17 additions and 79 deletions

View File

@@ -3,30 +3,13 @@ use clap::{App, Arg, SubCommand};
pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
App::new("account_manager")
.visible_aliases(&["am", "account", "account_manager"])
.about("Eth 2.0 Accounts Manager")
.arg(
Arg::with_name("logfile")
.long("logfile")
.value_name("logfile")
.help("File path where output will be written.")
.takes_value(true),
)
.arg(
Arg::with_name("datadir")
.long("datadir")
.short("d")
.value_name("DIR")
.help("Data directory for keys and databases.")
.takes_value(true),
)
.about("Utilities for generating and managing Ethereum 2.0 accounts.")
.subcommand(
SubCommand::with_name("validator")
.about("Eth2 validator managment commands.")
.version("0.0.1")
.author("Sigma Prime <contact@sigmaprime.io>")
.about("Generate or manage Etheruem 2.0 validators.")
.subcommand(
SubCommand::with_name("new")
.about("Create a new validator.")
.about("Create a new Ethereum 2.0 validator.")
.subcommand(
SubCommand::with_name("insecure")
.about("Uses the insecure deterministic keypairs. Do not store value in these.")

View File

@@ -52,7 +52,7 @@ fn run_account_manager<T: EthSpec>(
match matches.subcommand() {
("validator", Some(matches)) => match matches.subcommand() {
("new", Some(matches)) => new_validator_subcommand(matches, datadir, context)?,
("new", Some(matches)) => run_new_validator_subcommand(matches, datadir, context)?,
_ => {
return Err("Invalid 'validator new' command. See --help.".to_string());
}
@@ -74,7 +74,7 @@ enum KeygenMethod {
}
/// Process the subcommand for creating new validators.
fn new_validator_subcommand<T: EthSpec>(
fn run_new_validator_subcommand<T: EthSpec>(
matches: &ArgMatches,
datadir: PathBuf,
context: RuntimeContext<T>,