2019-01-15 17:42:55 +11:00

13 lines
358 B
Rust

use types::BeaconBlock;
#[derive(Debug, PartialEq, Clone)]
pub enum BeaconNodeError {
RemoteFailure(String),
DecodeFailure,
}
pub trait BeaconNode: Send + Sync {
fn produce_beacon_block(&self, slot: u64) -> Result<Option<BeaconBlock>, BeaconNodeError>;
fn publish_beacon_block(&self, block: BeaconBlock) -> Result<bool, BeaconNodeError>;
}