Rename BeaconStateTypes to EthSpec

This commit is contained in:
Paul Hauner
2019-05-10 14:47:09 +10:00
parent 75b310a078
commit ce8ebeccbc
60 changed files with 223 additions and 235 deletions

View File

@@ -9,14 +9,13 @@ use beacon_chain::{
};
use eth2_libp2p::rpc::HelloMessage;
use types::{
Attestation, BeaconBlock, BeaconBlockBody, BeaconBlockHeader, BeaconStateTypes, Epoch, Hash256,
Slot,
Attestation, BeaconBlock, BeaconBlockBody, BeaconBlockHeader, Epoch, EthSpec, Hash256, Slot,
};
pub use beacon_chain::{BeaconChainError, BlockProcessingOutcome, InvalidBlock};
/// The network's API to the beacon chain.
pub trait BeaconChain<B: BeaconStateTypes>: Send + Sync {
pub trait BeaconChain<B: EthSpec>: Send + Sync {
fn get_spec(&self) -> &ChainSpec;
fn get_state(&self) -> RwLockReadGuard<BeaconState<B>>;
@@ -70,7 +69,7 @@ where
T: ClientDB + Sized,
U: SlotClock,
F: ForkChoice,
B: BeaconStateTypes,
B: EthSpec,
{
fn get_spec(&self) -> &ChainSpec {
&self.spec