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

@@ -1,13 +1,11 @@
//! The optimised bitwise LMD-GHOST fork choice rule.
extern crate bit_vec;
use crate::{ForkChoice, ForkChoiceError};
use bit_vec::BitVec;
use db::Store;
use log::{debug, trace};
use std::collections::HashMap;
use std::marker::PhantomData;
use std::sync::Arc;
use store::Store;
use types::{BeaconBlock, BeaconState, ChainSpec, EthSpec, Hash256, Slot, SlotHeight};
//TODO: Pruning - Children

View File

@@ -21,9 +21,9 @@ pub mod longest_chain;
pub mod optimized_lmd_ghost;
pub mod slow_lmd_ghost;
// use db::stores::BeaconBlockAtSlotError;
// use db::DBError;
use db::Error as DBError;
// use store::stores::BeaconBlockAtSlotError;
// use store::DBError;
use store::Error as DBError;
use types::{BeaconBlock, ChainSpec, Hash256};
pub use bitwise_lmd_ghost::BitwiseLMDGhost;

View File

@@ -1,6 +1,6 @@
use crate::{ForkChoice, ForkChoiceError};
use db::Store;
use std::sync::Arc;
use store::Store;
use types::{BeaconBlock, ChainSpec, Hash256, Slot};
pub struct LongestChain<T> {

View File

@@ -1,13 +1,11 @@
//! The optimised bitwise LMD-GHOST fork choice rule.
extern crate bit_vec;
use crate::{ForkChoice, ForkChoiceError};
use db::Store;
use log::{debug, trace};
use std::cmp::Ordering;
use std::collections::HashMap;
use std::marker::PhantomData;
use std::sync::Arc;
use store::Store;
use types::{BeaconBlock, BeaconState, ChainSpec, EthSpec, Hash256, Slot, SlotHeight};
//TODO: Pruning - Children

View File

@@ -1,11 +1,9 @@
extern crate db;
use crate::{ForkChoice, ForkChoiceError};
use db::Store;
use log::{debug, trace};
use std::collections::HashMap;
use std::marker::PhantomData;
use std::sync::Arc;
use store::Store;
use types::{BeaconBlock, BeaconState, ChainSpec, EthSpec, Hash256, Slot};
//TODO: Pruning and syncing