mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Make CLI args more consistent
This commit is contained in:
@@ -39,8 +39,8 @@ pub fn run<T: EthSpec>(mut env: Environment<T>, matches: &ArgMatches) -> Result<
|
||||
let password = parse_password(matches)?;
|
||||
|
||||
let endpoint = matches
|
||||
.value_of("endpoint")
|
||||
.ok_or_else(|| "Endpoint not specified")?;
|
||||
.value_of("eth1-endpoint")
|
||||
.ok_or_else(|| "eth1-endpoint not specified")?;
|
||||
|
||||
let (_event_loop, transport) = Http::new(&endpoint).map_err(|e| {
|
||||
format!(
|
||||
|
||||
@@ -135,9 +135,9 @@ fn main() {
|
||||
.help("The MIN_GENESIS_TIME constant."),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("endpoint")
|
||||
Arg::with_name("eth1-endpoint")
|
||||
.short("e")
|
||||
.long("endpoint")
|
||||
.long("eth1-endpoint")
|
||||
.value_name("HTTP_SERVER")
|
||||
.takes_value(true)
|
||||
.default_value("http://localhost:8545")
|
||||
@@ -173,9 +173,9 @@ fn main() {
|
||||
.help("The testnet dir. Defaults to ~/.lighthouse/testnet"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("endpoint")
|
||||
Arg::with_name("eth1-endpoint")
|
||||
.short("e")
|
||||
.long("endpoint")
|
||||
.long("eth1-endpoint")
|
||||
.value_name("HTTP_SERVER")
|
||||
.takes_value(true)
|
||||
.default_value("http://localhost:8545")
|
||||
|
||||
@@ -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> {
|
||||
let endpoint = matches
|
||||
.value_of("endpoint")
|
||||
.ok_or_else(|| "Endpoint not specified")?;
|
||||
.value_of("eth1-endpoint")
|
||||
.ok_or_else(|| "eth1-endpoint not specified")?;
|
||||
|
||||
let account_index = matches
|
||||
.value_of("account-index")
|
||||
|
||||
Reference in New Issue
Block a user