mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-09 03:17:55 +00:00
Modularize beacon node backend (#4718)
#4669 Modularize the beacon node backend to make it easier to add new database implementations
This commit is contained in:
@@ -14,7 +14,8 @@ use state_processing::per_block_processing::errors::{
|
||||
AttesterSlashingInvalid, BlockOperationError, ExitInvalid, ProposerSlashingInvalid,
|
||||
};
|
||||
use std::sync::{Arc, LazyLock};
|
||||
use store::{LevelDB, StoreConfig};
|
||||
use store::database::interface::BeaconNodeBackend;
|
||||
use store::StoreConfig;
|
||||
use tempfile::{tempdir, TempDir};
|
||||
use types::*;
|
||||
|
||||
@@ -26,7 +27,7 @@ static KEYPAIRS: LazyLock<Vec<Keypair>> =
|
||||
|
||||
type E = MinimalEthSpec;
|
||||
type TestHarness = BeaconChainHarness<DiskHarnessType<E>>;
|
||||
type HotColdDB = store::HotColdDB<E, LevelDB<E>, LevelDB<E>>;
|
||||
type HotColdDB = store::HotColdDB<E, BeaconNodeBackend<E>, BeaconNodeBackend<E>>;
|
||||
|
||||
fn get_store(db_path: &TempDir) -> Arc<HotColdDB> {
|
||||
let spec = Arc::new(test_spec::<E>());
|
||||
|
||||
Reference in New Issue
Block a user