Rename db crate to store

This commit is contained in:
Paul Hauner
2019-05-21 18:20:23 +10:00
parent 29427cf0e6
commit 3bcf5ba706
30 changed files with 76 additions and 90 deletions

View File

@@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
beacon_chain = { path = "../beacon_chain" }
network = { path = "../network" }
db = { path = "../db" }
store = { path = "../store" }
rpc = { path = "../rpc" }
fork_choice = { path = "../../eth2/fork_choice" }
types = { path = "../../eth2/types" }

View File

@@ -1,9 +1,9 @@
use crate::{ArcBeaconChain, ClientConfig};
use beacon_chain::{
db::{DiskDB, MemoryDB, Store},
fork_choice::BitwiseLMDGhost,
initialise,
slot_clock::{SlotClock, SystemTimeSlotClock},
store::{DiskStore, MemoryStore, Store},
};
use fork_choice::ForkChoice;
use types::{EthSpec, FewValidatorsEthSpec, FoundationEthSpec};
@@ -22,7 +22,7 @@ pub trait ClientTypes {
pub struct StandardClientType;
impl ClientTypes for StandardClientType {
type DB = DiskDB;
type DB = DiskStore;
type SlotClock = SystemTimeSlotClock;
type ForkChoice = BitwiseLMDGhost<Self::DB, Self::EthSpec>;
type EthSpec = FoundationEthSpec;
@@ -34,10 +34,10 @@ impl ClientTypes for StandardClientType {
}
}
pub struct MemoryDBTestingClientType;
pub struct MemoryStoreTestingClientType;
impl ClientTypes for MemoryDBTestingClientType {
type DB = MemoryDB;
impl ClientTypes for MemoryStoreTestingClientType {
type DB = MemoryStore;
type SlotClock = SystemTimeSlotClock;
type ForkChoice = BitwiseLMDGhost<Self::DB, Self::EthSpec>;
type EthSpec = FewValidatorsEthSpec;
@@ -49,10 +49,10 @@ impl ClientTypes for MemoryDBTestingClientType {
}
}
pub struct DiskDBTestingClientType;
pub struct DiskStoreTestingClientType;
impl ClientTypes for DiskDBTestingClientType {
type DB = DiskDB;
impl ClientTypes for DiskStoreTestingClientType {
type DB = DiskStore;
type SlotClock = SystemTimeSlotClock;
type ForkChoice = BitwiseLMDGhost<Self::DB, Self::EthSpec>;
type EthSpec = FewValidatorsEthSpec;

View File

@@ -8,7 +8,6 @@ pub mod notifier;
use beacon_chain::BeaconChain;
pub use client_config::{ClientConfig, DBType};
pub use client_types::ClientTypes;
use db::Store;
use exit_future::Signal;
use fork_choice::ForkChoice;
use futures::{future::Future, Stream};
@@ -18,6 +17,7 @@ use slot_clock::SlotClock;
use std::marker::PhantomData;
use std::sync::Arc;
use std::time::{Duration, Instant};
use store::Store;
use tokio::runtime::TaskExecutor;
use tokio::timer::Interval;
use types::EthSpec;