mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 13:28:33 +00:00
Migrate validator client to clap derive (#6300)
Partially #5900 Migrate the validator client cli to clap derive
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
mod cli;
|
||||
pub mod cli;
|
||||
pub mod config;
|
||||
mod latency;
|
||||
mod notifier;
|
||||
|
||||
pub use cli::cli_app;
|
||||
use crate::cli::ValidatorClient;
|
||||
pub use config::Config;
|
||||
use initialized_validators::InitializedValidators;
|
||||
use metrics::set_gauge;
|
||||
@@ -11,11 +11,10 @@ use monitoring_api::{MonitoringHttpClient, ProcessType};
|
||||
use sensitive_url::SensitiveUrl;
|
||||
use slashing_protection::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
|
||||
|
||||
use account_utils::validator_definitions::ValidatorDefinitions;
|
||||
use beacon_node_fallback::{
|
||||
start_fallback_updater_service, BeaconNodeFallback, CandidateBeaconNode,
|
||||
};
|
||||
|
||||
use account_utils::validator_definitions::ValidatorDefinitions;
|
||||
use clap::ArgMatches;
|
||||
use doppelganger_service::DoppelgangerService;
|
||||
use environment::RuntimeContext;
|
||||
@@ -96,8 +95,9 @@ impl<E: EthSpec> ProductionValidatorClient<E> {
|
||||
pub async fn new_from_cli(
|
||||
context: RuntimeContext<E>,
|
||||
cli_args: &ArgMatches,
|
||||
validator_client_config: &ValidatorClient,
|
||||
) -> Result<Self, String> {
|
||||
let config = Config::from_cli(cli_args, context.log())
|
||||
let config = Config::from_cli(cli_args, validator_client_config, context.log())
|
||||
.map_err(|e| format!("Unable to initialize config: {}", e))?;
|
||||
Self::new(context, config).await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user