Update EpochDuty RPC and core functionality

This commit is contained in:
Age Manning
2019-03-27 15:41:51 +11:00
parent 96ccd58414
commit bc8ec51fe5
4 changed files with 79 additions and 88 deletions

View File

@@ -8,12 +8,13 @@ pub enum BeaconNodeError {
/// Defines the methods required to obtain a validators shuffling from a Beacon Node.
pub trait BeaconNode: Send + Sync {
/// Get the shuffling for the given epoch and public key.
/// Gets the duties for all validators.
///
/// Returns Ok(None) if the public key is unknown, or the shuffling for that epoch is unknown.
fn request_shuffling(
/// 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<Option<EpochDuties>, BeaconNodeError>;
) -> Result<Vec<Option<EpochDuties>>, BeaconNodeError>;
}