Make CLI args more consistent

This commit is contained in:
Paul Hauner
2019-11-27 13:47:35 +11:00
parent 66d624e538
commit 0408fa6fd6
3 changed files with 8 additions and 8 deletions

View File

@@ -39,8 +39,8 @@ pub fn run<T: EthSpec>(mut env: Environment<T>, matches: &ArgMatches) -> Result<
let password = parse_password(matches)?; let password = parse_password(matches)?;
let endpoint = matches let endpoint = matches
.value_of("endpoint") .value_of("eth1-endpoint")
.ok_or_else(|| "Endpoint not specified")?; .ok_or_else(|| "eth1-endpoint not specified")?;
let (_event_loop, transport) = Http::new(&endpoint).map_err(|e| { let (_event_loop, transport) = Http::new(&endpoint).map_err(|e| {
format!( format!(

View File

@@ -135,9 +135,9 @@ fn main() {
.help("The MIN_GENESIS_TIME constant."), .help("The MIN_GENESIS_TIME constant."),
) )
.arg( .arg(
Arg::with_name("endpoint") Arg::with_name("eth1-endpoint")
.short("e") .short("e")
.long("endpoint") .long("eth1-endpoint")
.value_name("HTTP_SERVER") .value_name("HTTP_SERVER")
.takes_value(true) .takes_value(true)
.default_value("http://localhost:8545") .default_value("http://localhost:8545")
@@ -173,9 +173,9 @@ fn main() {
.help("The testnet dir. Defaults to ~/.lighthouse/testnet"), .help("The testnet dir. Defaults to ~/.lighthouse/testnet"),
) )
.arg( .arg(
Arg::with_name("endpoint") Arg::with_name("eth1-endpoint")
.short("e") .short("e")
.long("endpoint") .long("eth1-endpoint")
.value_name("HTTP_SERVER") .value_name("HTTP_SERVER")
.takes_value(true) .takes_value(true)
.default_value("http://localhost:8545") .default_value("http://localhost:8545")

View File

@@ -18,8 +18,8 @@ pub const DEPOSIT_ROOT_FN_SIGNATURE: &[u8] = &[0xcf, 0x7a, 0x89, 0x65];
pub fn run<T: EthSpec>(mut env: Environment<T>, matches: &ArgMatches) -> Result<(), String> { pub fn run<T: EthSpec>(mut env: Environment<T>, matches: &ArgMatches) -> Result<(), String> {
let endpoint = matches let endpoint = matches
.value_of("endpoint") .value_of("eth1-endpoint")
.ok_or_else(|| "Endpoint not specified")?; .ok_or_else(|| "eth1-endpoint not specified")?;
let account_index = matches let account_index = matches
.value_of("account-index") .value_of("account-index")