mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 14:24:44 +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:
@@ -2,7 +2,6 @@ mod cli;
|
||||
mod config;
|
||||
|
||||
pub use beacon_chain;
|
||||
use beacon_chain::store::LevelDB;
|
||||
use beacon_chain::{
|
||||
builder::Witness, eth1_chain::CachingEth1Backend, slot_clock::SystemTimeSlotClock,
|
||||
};
|
||||
@@ -16,11 +15,19 @@ use slasher::{DatabaseBackendOverride, Slasher};
|
||||
use slog::{info, warn};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::sync::Arc;
|
||||
use store::database::interface::BeaconNodeBackend;
|
||||
use types::{ChainSpec, Epoch, EthSpec, ForkName};
|
||||
|
||||
/// A type-alias to the tighten the definition of a production-intended `Client`.
|
||||
pub type ProductionClient<E> =
|
||||
Client<Witness<SystemTimeSlotClock, CachingEth1Backend<E>, E, LevelDB<E>, LevelDB<E>>>;
|
||||
pub type ProductionClient<E> = Client<
|
||||
Witness<
|
||||
SystemTimeSlotClock,
|
||||
CachingEth1Backend<E>,
|
||||
E,
|
||||
BeaconNodeBackend<E>,
|
||||
BeaconNodeBackend<E>,
|
||||
>,
|
||||
>;
|
||||
|
||||
/// The beacon node `Client` that will be used in production.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user