mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Merged age-validator-client into luke's changes on validator_client, and fixed all the merge conflicts.
This commit is contained in:
@@ -5,14 +5,18 @@ use beacon_chain::{
|
||||
parking_lot::RwLockReadGuard,
|
||||
slot_clock::SlotClock,
|
||||
types::{BeaconState, ChainSpec},
|
||||
CheckPoint,
|
||||
};
|
||||
pub use beacon_chain::{BeaconChainError, BlockProcessingOutcome};
|
||||
use types::BeaconBlock;
|
||||
|
||||
/// The RPC's API to the beacon chain.
|
||||
pub trait BeaconChain: Send + Sync {
|
||||
fn get_spec(&self) -> &ChainSpec;
|
||||
|
||||
fn get_state(&self) -> RwLockReadGuard<BeaconState>;
|
||||
|
||||
fn process_block(&self, block: BeaconBlock)
|
||||
-> Result<BlockProcessingOutcome, BeaconChainError>;
|
||||
}
|
||||
|
||||
impl<T, U, F> BeaconChain for RawBeaconChain<T, U, F>
|
||||
@@ -28,4 +32,11 @@ where
|
||||
fn get_state(&self) -> RwLockReadGuard<BeaconState> {
|
||||
self.state.read()
|
||||
}
|
||||
|
||||
fn process_block(
|
||||
&self,
|
||||
block: BeaconBlock,
|
||||
) -> Result<BlockProcessingOutcome, BeaconChainError> {
|
||||
self.process_block(block)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user