Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
eserilev committed Apr 4, 2024
1 parent f6653b0 commit 30556d0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 24 deletions.
2 changes: 0 additions & 2 deletions beacon_node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1439,8 +1439,6 @@ pub fn cli_app() -> Command {
.long("progressive-balances")
.value_name("MODE")
.help("Deprecated. This optimisation is now the default and cannot be disabled.")
.takes_value(true)
.possible_values(&["fast", "disabled", "checked", "strict"])
.action(ArgAction::Set)
.display_order(0)
)
Expand Down
6 changes: 3 additions & 3 deletions beacon_node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use beacon_chain::chain_config::{
DEFAULT_RE_ORG_MAX_EPOCHS_SINCE_FINALIZATION, DEFAULT_RE_ORG_THRESHOLD,
};
use beacon_chain::TrustedSetup;
use clap::ArgMatches;
use clap::{ArgMatches, Id};
use clap_utils::flags::DISABLE_MALLOC_TUNING_FLAG;
use clap_utils::{parse_flag, parse_required};
use client::{ClientConfig, ClientGenesis};
Expand Down Expand Up @@ -103,7 +103,7 @@ pub fn get_config<E: EthSpec>(
* Http API server
*/

if parse_flag(cli_args, "enable_http") {
if cli_args.get_one::<Id>("enable_http").is_some() {
client_config.http_api.enabled = true;

if let Some(address) = cli_args.get_one::<String>("http-address") {
Expand Down Expand Up @@ -843,7 +843,7 @@ pub fn get_config<E: EthSpec>(
client_config.network.invalid_block_storage = Some(path);
}

if cli_args.is_present("progressive-balances") {
if cli_args.get_one::<String>("progressive-balances").is_some() {
warn!(
log,
"Progressive balances mode is deprecated";
Expand Down
20 changes: 1 addition & 19 deletions lighthouse/tests/validator_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,25 +594,7 @@ fn wrong_broadcast_flag() {
#[test]
fn latency_measurement_service() {
CommandLineTest::new()
.flag("latency-measurement-service", None)
.run()
.with_config(|config| {
assert!(config.enable_latency_measurement_service);
});
CommandLineTest::new()
.flag("latency-measurement-service", None)
.run()
.with_config(|config| {
assert!(config.enable_latency_measurement_service);
});
CommandLineTest::new()
.flag("latency-measurement-service", None)
.run()
.with_config(|config| {
assert!(config.enable_latency_measurement_service);
});
CommandLineTest::new()
// .flag("latency-measurement-service", Some("false"))
.flag("disable-latency-measurement-service", None)
.run()
.with_config(|config| {
assert!(!config.enable_latency_measurement_service);
Expand Down

0 comments on commit 30556d0

Please sign in to comment.