Remove sync crate, move into network crate

This commit is contained in:
Age Manning
2019-03-19 00:05:06 +11:00
parent 8ec0688cb9
commit 41abdb7599
10 changed files with 24 additions and 25 deletions

View File

@@ -1,11 +1,13 @@
use beacon_chain::BeaconChain as RawBeaconChain;
use beacon_chain::{
db::ClientDB, fork_choice::ForkChoice, parking_lot::RwLockReadGuard, slot_clock::SlotClock,
CheckPoint,
types::ChainSpec, CheckPoint,
};
/// The network's API to the beacon chain.
pub trait BeaconChain: Send + Sync {
fn get_spec(&self) -> &ChainSpec;
fn head(&self) -> RwLockReadGuard<CheckPoint>;
fn finalized_head(&self) -> RwLockReadGuard<CheckPoint>;
@@ -17,6 +19,10 @@ where
U: SlotClock,
F: ForkChoice,
{
fn get_spec(&self) -> &ChainSpec {
&self.spec
}
fn head(&self) -> RwLockReadGuard<CheckPoint> {
self.head()
}