mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 18:21:45 +00:00
21 lines
621 B
Rust
21 lines
621 B
Rust
use super::EpochDuties;
|
|
use types::{Epoch, PublicKey};
|
|
|
|
#[derive(Debug, PartialEq, Clone)]
|
|
pub enum BeaconNodeDutiesError {
|
|
RemoteFailure(String),
|
|
}
|
|
|
|
/// Defines the methods required to obtain a validators shuffling from a Beacon Node.
|
|
pub trait BeaconNodeDuties: Send + Sync {
|
|
/// Gets the duties for all validators.
|
|
///
|
|
/// Returns a vector of EpochDuties for each validator public key. The entry will be None for
|
|
/// validators that are not activated.
|
|
fn request_duties(
|
|
&self,
|
|
epoch: Epoch,
|
|
pubkeys: &[PublicKey],
|
|
) -> Result<EpochDuties, BeaconNodeDutiesError>;
|
|
}
|