mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-17 03:42:46 +00:00
Remove old command
This commit is contained in:
32
validator_manager/src/validators/mod.rs
Normal file
32
validator_manager/src/validators/mod.rs
Normal file
@@ -0,0 +1,32 @@
|
||||
pub mod common;
|
||||
pub mod create_validators;
|
||||
pub mod import_validators;
|
||||
|
||||
use clap::{App, ArgMatches};
|
||||
use environment::Environment;
|
||||
use types::EthSpec;
|
||||
|
||||
pub const CMD: &str = "validators";
|
||||
|
||||
pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
App::new(CMD)
|
||||
.about("Provides commands for managing validators in a Lighthouse Validator Client.")
|
||||
.subcommand(create_validators::cli_app())
|
||||
.subcommand(import_validators::cli_app())
|
||||
}
|
||||
|
||||
pub async fn cli_run<'a, T: EthSpec>(
|
||||
matches: &'a ArgMatches<'a>,
|
||||
env: Environment<T>,
|
||||
) -> Result<(), String> {
|
||||
match matches.subcommand() {
|
||||
(create_validators::CMD, Some(matches)) => {
|
||||
create_validators::cli_run::<T>(matches, env).await
|
||||
}
|
||||
(import_validators::CMD, Some(matches)) => import_validators::cli_run(matches).await,
|
||||
(unknown, _) => Err(format!(
|
||||
"{} does not have a {} command. See --help",
|
||||
CMD, unknown
|
||||
)),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user