mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
Drop unused EthSpec generic from Stores (#9281)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
This commit is contained in:
@@ -27,7 +27,7 @@ static KEYPAIRS: LazyLock<Vec<Keypair>> =
|
||||
|
||||
type E = MinimalEthSpec;
|
||||
type TestHarness = BeaconChainHarness<DiskHarnessType<E>>;
|
||||
type HotColdDB = store::HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>;
|
||||
type HotColdDB = store::HotColdDB<E, BeaconNodeBackend, BeaconNodeBackend>;
|
||||
|
||||
fn get_store(db_path: &TempDir) -> Arc<HotColdDB> {
|
||||
let spec = Arc::new(test_spec::<E>());
|
||||
|
||||
@@ -34,7 +34,7 @@ type TestHarness = BeaconChainHarness<DiskHarnessType<E>>;
|
||||
fn get_store(
|
||||
db_path: &TempDir,
|
||||
spec: Arc<ChainSpec>,
|
||||
) -> Arc<HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>> {
|
||||
) -> Arc<HotColdDB<E, BeaconNodeBackend, BeaconNodeBackend>> {
|
||||
let store_config = StoreConfig {
|
||||
prune_payloads: false,
|
||||
..StoreConfig::default()
|
||||
@@ -46,7 +46,7 @@ fn get_store_generic(
|
||||
db_path: &TempDir,
|
||||
config: StoreConfig,
|
||||
spec: Arc<ChainSpec>,
|
||||
) -> Arc<HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>> {
|
||||
) -> Arc<HotColdDB<E, BeaconNodeBackend, BeaconNodeBackend>> {
|
||||
create_test_tracing_subscriber();
|
||||
let hot_path = db_path.path().join("chain_db");
|
||||
let cold_path = db_path.path().join("freezer_db");
|
||||
@@ -64,7 +64,7 @@ fn get_store_generic(
|
||||
}
|
||||
|
||||
fn get_harness(
|
||||
store: Arc<HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>>,
|
||||
store: Arc<HotColdDB<E, BeaconNodeBackend, BeaconNodeBackend>>,
|
||||
validator_count: usize,
|
||||
) -> TestHarness {
|
||||
// Most tests expect to retain historic states, so we use this as the default.
|
||||
@@ -81,7 +81,7 @@ fn get_harness(
|
||||
}
|
||||
|
||||
fn get_harness_generic(
|
||||
store: Arc<HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>>,
|
||||
store: Arc<HotColdDB<E, BeaconNodeBackend, BeaconNodeBackend>>,
|
||||
validator_count: usize,
|
||||
chain_config: ChainConfig,
|
||||
node_custody_type: NodeCustodyType,
|
||||
|
||||
@@ -20,7 +20,7 @@ use tempfile::{TempDir, tempdir};
|
||||
use types::{ChainSpec, Hash256, MainnetEthSpec, Slot};
|
||||
|
||||
type E = MainnetEthSpec;
|
||||
type Store<E> = Arc<HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>>;
|
||||
type Store<E> = Arc<HotColdDB<E, BeaconNodeBackend, BeaconNodeBackend>>;
|
||||
type TestHarness = BeaconChainHarness<DiskHarnessType<E>>;
|
||||
|
||||
const VALIDATOR_COUNT: usize = 32;
|
||||
|
||||
@@ -106,7 +106,7 @@ fn get_or_reconstruct_blobs<T: BeaconChainTypes>(
|
||||
}
|
||||
}
|
||||
|
||||
fn get_store(db_path: &TempDir) -> Arc<HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>> {
|
||||
fn get_store(db_path: &TempDir) -> Arc<HotColdDB<E, BeaconNodeBackend, BeaconNodeBackend>> {
|
||||
let store_config = StoreConfig {
|
||||
prune_payloads: false,
|
||||
..StoreConfig::default()
|
||||
@@ -118,7 +118,7 @@ fn get_store_generic(
|
||||
db_path: &TempDir,
|
||||
config: StoreConfig,
|
||||
spec: ChainSpec,
|
||||
) -> Arc<HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>> {
|
||||
) -> Arc<HotColdDB<E, BeaconNodeBackend, BeaconNodeBackend>> {
|
||||
create_test_tracing_subscriber();
|
||||
let hot_path = db_path.path().join("chain_db");
|
||||
let cold_path = db_path.path().join("freezer_db");
|
||||
@@ -136,7 +136,7 @@ fn get_store_generic(
|
||||
}
|
||||
|
||||
fn get_harness(
|
||||
store: Arc<HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>>,
|
||||
store: Arc<HotColdDB<E, BeaconNodeBackend, BeaconNodeBackend>>,
|
||||
validator_count: usize,
|
||||
) -> TestHarness {
|
||||
// Most tests expect to retain historic states, so we use this as the default.
|
||||
@@ -153,7 +153,7 @@ fn get_harness(
|
||||
}
|
||||
|
||||
fn get_harness_import_all_data_columns(
|
||||
store: Arc<HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>>,
|
||||
store: Arc<HotColdDB<E, BeaconNodeBackend, BeaconNodeBackend>>,
|
||||
validator_count: usize,
|
||||
) -> TestHarness {
|
||||
// Most tests expect to retain historic states, so we use this as the default.
|
||||
@@ -171,7 +171,7 @@ fn get_harness_import_all_data_columns(
|
||||
}
|
||||
|
||||
fn get_harness_generic(
|
||||
store: Arc<HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>>,
|
||||
store: Arc<HotColdDB<E, BeaconNodeBackend, BeaconNodeBackend>>,
|
||||
validator_count: usize,
|
||||
chain_config: ChainConfig,
|
||||
node_custody_type: NodeCustodyType,
|
||||
@@ -205,7 +205,7 @@ fn check_db_invariants(harness: &TestHarness) {
|
||||
}
|
||||
|
||||
fn get_states_descendant_of_block(
|
||||
store: &HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>,
|
||||
store: &HotColdDB<E, BeaconNodeBackend, BeaconNodeBackend>,
|
||||
block_root: Hash256,
|
||||
) -> Vec<(Hash256, Slot)> {
|
||||
let summaries = store.load_hot_state_summaries().unwrap();
|
||||
@@ -5859,7 +5859,7 @@ async fn test_gloas_hot_state_hierarchy() {
|
||||
/// Check that the HotColdDB's split_slot is equal to the start slot of the last finalized epoch.
|
||||
fn check_split_slot(
|
||||
harness: &TestHarness,
|
||||
store: Arc<HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>>,
|
||||
store: Arc<HotColdDB<E, BeaconNodeBackend, BeaconNodeBackend>>,
|
||||
) {
|
||||
let split_slot = store.get_split_slot();
|
||||
assert_eq!(
|
||||
|
||||
Reference in New Issue
Block a user