From 86c3bcd3613a056c269277969753ec033da3330b Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Thu, 1 Dec 2022 20:32:07 +1100 Subject: [PATCH] Add misc changes --- common/eth2/src/lighthouse_vc/http_client.rs | 2 +- validator_manager/src/move_validators.rs | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/common/eth2/src/lighthouse_vc/http_client.rs b/common/eth2/src/lighthouse_vc/http_client.rs index a2e3e3f6ff..e34d362b04 100644 --- a/common/eth2/src/lighthouse_vc/http_client.rs +++ b/common/eth2/src/lighthouse_vc/http_client.rs @@ -487,7 +487,7 @@ impl ValidatorClientHttpClient { .await } - /// `DELETE eth/v1/keystores` + /// `DELETE lighthouse/keystores` pub async fn delete_lighthouse_keystores( &self, req: &DeleteKeystoresRequest, diff --git a/validator_manager/src/move_validators.rs b/validator_manager/src/move_validators.rs index ab1db3c2cd..b5766f53c6 100644 --- a/validator_manager/src/move_validators.rs +++ b/validator_manager/src/move_validators.rs @@ -31,6 +31,7 @@ pub const VALIDATORS_FLAG: &str = "validators"; pub const GAS_LIMIT_FLAG: &str = "gas-limit"; pub const FEE_RECIPIENT_FLAG: &str = "suggested-fee-recipient"; pub const BUILDER_PROPOSALS_FLAG: &str = "builder-proposals"; +pub const SKIP_WARNING_PROMPTS: &str = "skip-warning-prompts"; const NO_VALIDATORS_MSG: &str = "No validators present on source validator client"; @@ -128,6 +129,17 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { .possible_values(&["true", "false"]) .takes_value(true), ) + .arg( + Arg::with_name(SKIP_WARNING_PROMPTS) + .long(SKIP_WARNING_PROMPTS) + .help( + "Don't display interactive warning prompts. Only provide \ + this flag if you know what the prompts say and you know \ + what you're doing.", + ) + .required(false) + .takes_value(false), + ) } #[derive(Clone, PartialEq, Debug, Serialize, Deserialize)] @@ -167,6 +179,7 @@ pub struct MoveConfig { pub builder_proposals: Option, pub fee_recipient: Option
, pub gas_limit: Option, + pub skip_warning_prompts: bool, } impl MoveConfig { @@ -180,6 +193,7 @@ impl MoveConfig { builder_proposals: clap_utils::parse_optional(matches, BUILDER_PROPOSALS_FLAG)?, fee_recipient: clap_utils::parse_optional(matches, FEE_RECIPIENT_FLAG)?, gas_limit: clap_utils::parse_optional(matches, GAS_LIMIT_FLAG)?, + skip_warning_prompts: matches.is_present(SKIP_WARNING_PROMPTS), }) } } @@ -206,6 +220,7 @@ async fn run<'a>(config: MoveConfig) -> Result<(), String> { builder_proposals, fee_recipient, gas_limit, + skip_warning_prompts } = config; // Moving validators between the same VC is unlikely to be useful and probably indicates a user