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

@@ -7,24 +7,24 @@ use account_utils::{
use deposit_contract::decode_eth1_tx_data;
use doppelganger_service::DoppelgangerService;
use eth2::{
Error as ApiError,
lighthouse_vc::{http_client::ValidatorClientHttpClient, types::*},
types::ErrorMessage as ApiErrorMessage,
Error as ApiError,
};
use eth2_keystore::KeystoreBuilder;
use initialized_validators::key_cache::{KeyCache, CACHE_FILENAME};
use initialized_validators::key_cache::{CACHE_FILENAME, KeyCache};
use initialized_validators::{InitializedValidators, OnDecryptFailure};
use lighthouse_validator_store::{Config as ValidatorStoreConfig, LighthouseValidatorStore};
use parking_lot::RwLock;
use sensitive_url::SensitiveUrl;
use slashing_protection::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
use slashing_protection::{SLASHING_PROTECTION_FILENAME, SlashingDatabase};
use slot_clock::{SlotClock, TestingSlotClock};
use std::future::Future;
use std::net::{IpAddr, Ipv4Addr};
use std::sync::Arc;
use std::time::Duration;
use task_executor::test_utils::TestRuntime;
use tempfile::{tempdir, TempDir};
use tempfile::{TempDir, tempdir};
use tokio::sync::oneshot;
use types::ChainSpec;
use validator_services::block_service::BlockService;
@@ -370,9 +370,11 @@ impl ApiTester {
// Ensure the server lists all of these newly created validators.
for validator in &response {
assert!(server_vals
.iter()
.any(|server_val| server_val.voting_pubkey == validator.voting_pubkey));
assert!(
server_vals
.iter()
.any(|server_val| server_val.voting_pubkey == validator.voting_pubkey)
);
}
/*
@@ -569,16 +571,17 @@ impl ApiTester {
enabled
);
assert!(self
.client
.get_lighthouse_validators()
.await
.unwrap()
.data
.into_iter()
.find(|v| v.voting_pubkey == validator.voting_pubkey)
.map(|v| v.enabled == enabled)
.unwrap());
assert!(
self.client
.get_lighthouse_validators()
.await
.unwrap()
.data
.into_iter()
.find(|v| v.voting_pubkey == validator.voting_pubkey)
.map(|v| v.enabled == enabled)
.unwrap()
);
// Check the server via an individual request.
assert_eq!(