mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2025-01-20 02:30:51 +00:00
13 lines
358 B
Rust
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>;
|
|
}
|