mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-29 10:54:24 +00:00
Update Rust Edition to 2024 (#7766)
* #7749 Thanks @dknopik and @michaelsproul for your help!
This commit is contained in:
@@ -6,7 +6,7 @@ use crate::{
|
||||
use flate2::bufread::{ZlibDecoder, ZlibEncoder};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::borrow::Borrow;
|
||||
use std::collections::{btree_map::Entry, BTreeMap, HashSet};
|
||||
use std::collections::{BTreeMap, HashSet, btree_map::Entry};
|
||||
use std::io::Read;
|
||||
use std::sync::Arc;
|
||||
use types::{AttesterSlashing, Epoch, EthSpec, IndexedAttestation};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use crate::{database::IndexedAttestationId, Error};
|
||||
use crate::{Error, database::IndexedAttestationId};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use std::borrow::Cow;
|
||||
use std::sync::{
|
||||
atomic::{AtomicU64, Ordering},
|
||||
Arc,
|
||||
atomic::{AtomicU64, Ordering},
|
||||
};
|
||||
use tree_hash::TreeHash as _;
|
||||
use tree_hash_derive::TreeHash;
|
||||
|
||||
@@ -4,8 +4,8 @@ mod mdbx_impl;
|
||||
mod redb_impl;
|
||||
|
||||
use crate::{
|
||||
metrics, AttesterRecord, AttesterSlashingStatus, CompactAttesterRecord, Config, Database,
|
||||
Error, ProposerSlashingStatus,
|
||||
AttesterRecord, AttesterSlashingStatus, CompactAttesterRecord, Config, Database, Error,
|
||||
ProposerSlashingStatus, metrics,
|
||||
};
|
||||
use byteorder::{BigEndian, ByteOrder};
|
||||
use interface::{Environment, OpenDatabases, RwTransaction};
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#![cfg(feature = "mdbx")]
|
||||
|
||||
use crate::{
|
||||
Config, Error,
|
||||
config::MEGABYTE,
|
||||
database::{
|
||||
interface::{Key, OpenDatabases, Value},
|
||||
*,
|
||||
},
|
||||
Config, Error,
|
||||
};
|
||||
use mdbx::{DatabaseFlags, Geometry, WriteFlags};
|
||||
use std::borrow::Cow;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#![cfg(feature = "redb")]
|
||||
use crate::{
|
||||
Config, Error,
|
||||
config::REDB_DATA_FILENAME,
|
||||
database::{
|
||||
interface::{Key, OpenDatabases, Value},
|
||||
*,
|
||||
},
|
||||
Config, Error,
|
||||
};
|
||||
use derivative::Derivative;
|
||||
use redb::{ReadableTable, TableDefinition};
|
||||
|
||||
@@ -23,8 +23,8 @@ pub use attester_record::{AttesterRecord, CompactAttesterRecord, IndexedAttester
|
||||
pub use block_queue::BlockQueue;
|
||||
pub use config::{Config, DatabaseBackend, DatabaseBackendOverride};
|
||||
pub use database::{
|
||||
interface::{Database, Environment, RwTransaction},
|
||||
IndexedAttestationId, SlasherDB,
|
||||
interface::{Database, Environment, RwTransaction},
|
||||
};
|
||||
pub use error::Error;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::{database::CURRENT_SCHEMA_VERSION, Error, SlasherDB};
|
||||
use crate::{Error, SlasherDB, database::CURRENT_SCHEMA_VERSION};
|
||||
use types::EthSpec;
|
||||
|
||||
impl<E: EthSpec> SlasherDB<E> {
|
||||
|
||||
@@ -5,8 +5,8 @@ use crate::metrics::{
|
||||
SLASHER_NUM_BLOCKS_PROCESSED,
|
||||
};
|
||||
use crate::{
|
||||
array, AttestationBatch, AttestationQueue, AttesterRecord, BlockQueue, Config, Error,
|
||||
IndexedAttestationId, ProposerSlashingStatus, RwTransaction, SimpleBatch, SlasherDB,
|
||||
AttestationBatch, AttestationQueue, AttesterRecord, BlockQueue, Config, Error,
|
||||
IndexedAttestationId, ProposerSlashingStatus, RwTransaction, SimpleBatch, SlasherDB, array,
|
||||
};
|
||||
use parking_lot::Mutex;
|
||||
use std::collections::HashSet;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use std::collections::HashSet;
|
||||
use std::sync::Arc;
|
||||
use types::{
|
||||
indexed_attestation::{IndexedAttestationBase, IndexedAttestationElectra},
|
||||
AggregateSignature, AttestationData, AttesterSlashing, AttesterSlashingBase,
|
||||
AttesterSlashingElectra, BeaconBlockHeader, ChainSpec, Checkpoint, Epoch, EthSpec,
|
||||
FixedBytesExtended, Hash256, IndexedAttestation, MainnetEthSpec, Signature,
|
||||
SignedBeaconBlockHeader, Slot,
|
||||
indexed_attestation::{IndexedAttestationBase, IndexedAttestationElectra},
|
||||
};
|
||||
|
||||
pub type E = MainnetEthSpec;
|
||||
|
||||
Reference in New Issue
Block a user