mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-24 00:08:27 +00:00
Rename db crate to store
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
pub use crate::{BeaconChain, BeaconChainError, CheckPoint};
|
||||
use db::MemoryDB;
|
||||
use fork_choice::BitwiseLMDGhost;
|
||||
use slot_clock::TestingSlotClock;
|
||||
use std::sync::Arc;
|
||||
use store::MemoryStore;
|
||||
use tree_hash::TreeHash;
|
||||
use types::*;
|
||||
use types::{test_utils::TestingBeaconStateBuilder, EthSpec, FewValidatorsEthSpec};
|
||||
|
||||
type TestingBeaconChain<E> =
|
||||
BeaconChain<MemoryDB, TestingSlotClock, BitwiseLMDGhost<MemoryDB, FewValidatorsEthSpec>, E>;
|
||||
type TestingBeaconChain<E> = BeaconChain<
|
||||
MemoryStore,
|
||||
TestingSlotClock,
|
||||
BitwiseLMDGhost<MemoryStore, FewValidatorsEthSpec>,
|
||||
E,
|
||||
>;
|
||||
|
||||
pub struct TestingBeaconChainBuilder<E: EthSpec> {
|
||||
state_builder: TestingBeaconStateBuilder<E>,
|
||||
@@ -16,7 +20,7 @@ pub struct TestingBeaconChainBuilder<E: EthSpec> {
|
||||
|
||||
impl<E: EthSpec> TestingBeaconChainBuilder<E> {
|
||||
pub fn build(self, spec: &ChainSpec) -> TestingBeaconChain<E> {
|
||||
let store = Arc::new(MemoryDB::open());
|
||||
let store = Arc::new(MemoryStore::open());
|
||||
let slot_clock = TestingSlotClock::new(spec.genesis_slot.as_u64());
|
||||
let fork_choice = BitwiseLMDGhost::new(store.clone());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user