Update Rust Edition to 2024 (#7766)

* #7749

Thanks @dknopik and @michaelsproul for your help!
This commit is contained in:
chonghe
2025-08-13 11:04:31 +08:00
committed by GitHub
parent bd6b8b6a65
commit 522bd9e9c6
468 changed files with 3594 additions and 3396 deletions

View File

@@ -1,8 +1,8 @@
use beacon_node_fallback::ApiTopic;
use clap::builder::ArgPredicate;
pub use clap::{FromArgMatches, Parser};
use clap_utils::get_color_style;
use clap_utils::FLAG_HEADER;
use clap_utils::get_color_style;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
use types::Address;

View File

@@ -1,11 +1,11 @@
use crate::cli::ValidatorClient;
use beacon_node_fallback::beacon_node_health::BeaconNodeSyncDistanceTiers;
use beacon_node_fallback::ApiTopic;
use beacon_node_fallback::beacon_node_health::BeaconNodeSyncDistanceTiers;
use clap::ArgMatches;
use clap_utils::{flags::DISABLE_MALLOC_TUNING_FLAG, parse_required};
use directory::{
get_network_dir, DEFAULT_HARDCODED_NETWORK, DEFAULT_ROOT_DIR, DEFAULT_SECRET_DIR,
DEFAULT_VALIDATOR_DIR,
DEFAULT_HARDCODED_NETWORK, DEFAULT_ROOT_DIR, DEFAULT_SECRET_DIR, DEFAULT_VALIDATOR_DIR,
get_network_dir,
};
use eth2::types::Graffiti;
use graffiti_file::GraffitiFile;
@@ -102,8 +102,10 @@ impl Default for Config {
let validator_dir = base_dir.join(DEFAULT_VALIDATOR_DIR);
let secrets_dir = base_dir.join(DEFAULT_SECRET_DIR);
let beacon_nodes = vec![SensitiveUrl::parse(DEFAULT_BEACON_NODE)
.expect("beacon_nodes must always be a valid url.")];
let beacon_nodes = vec![
SensitiveUrl::parse(DEFAULT_BEACON_NODE)
.expect("beacon_nodes must always be a valid url."),
];
Self {
validator_store: ValidatorStoreConfig::default(),
validator_dir,

View File

@@ -7,16 +7,16 @@ use initialized_validators::InitializedValidators;
use metrics::set_gauge;
use monitoring_api::{MonitoringHttpClient, ProcessType};
use sensitive_url::SensitiveUrl;
use slashing_protection::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
use slashing_protection::{SLASHING_PROTECTION_FILENAME, SlashingDatabase};
use account_utils::validator_definitions::ValidatorDefinitions;
use beacon_node_fallback::{
start_fallback_updater_service, BeaconNodeFallback, CandidateBeaconNode,
BeaconNodeFallback, CandidateBeaconNode, start_fallback_updater_service,
};
use clap::ArgMatches;
use doppelganger_service::DoppelgangerService;
use environment::RuntimeContext;
use eth2::{reqwest::ClientBuilder, BeaconNodeHttpClient, StatusCode, Timeouts};
use eth2::{BeaconNodeHttpClient, StatusCode, Timeouts, reqwest::ClientBuilder};
use initialized_validators::Error::UnableToOpenVotingKeystore;
use lighthouse_validator_store::LighthouseValidatorStore;
use parking_lot::RwLock;
@@ -31,7 +31,7 @@ use std::sync::Arc;
use std::time::{SystemTime, UNIX_EPOCH};
use tokio::{
sync::mpsc,
time::{sleep, Duration},
time::{Duration, sleep},
};
use tracing::{debug, error, info, warn};
use types::{EthSpec, Hash256};