More variable-variable lists

This commit is contained in:
Michael Sproul
2021-11-26 13:13:46 +11:00
parent 238ac98d7c
commit 4b808d3c72
17 changed files with 91 additions and 53 deletions

View File

@@ -1,6 +1,9 @@
use crate::per_epoch_processing::altair::participation_cache::Error as ParticipationCacheError;
use types::{BeaconStateError, InconsistentFork};
#[cfg(feature = "milhouse")]
use types::milhouse;
#[derive(Debug, PartialEq)]
pub enum EpochProcessingError {
UnableToDetermineProducer,
@@ -25,6 +28,8 @@ pub enum EpochProcessingError {
InvalidJustificationBit(ssz_types::Error),
InvalidFlagIndex(usize),
ParticipationCache(ParticipationCacheError),
#[cfg(feature = "milhouse")]
MilhouseError(milhouse::Error),
}
impl From<InclusionError> for EpochProcessingError {
@@ -57,6 +62,13 @@ impl From<ParticipationCacheError> for EpochProcessingError {
}
}
#[cfg(feature = "milhouse")]
impl From<milhouse::Error> for EpochProcessingError {
fn from(e: milhouse::Error) -> Self {
Self::MilhouseError(e)
}
}
#[derive(Debug, PartialEq)]
pub enum InclusionError {
/// The validator did not participate in an attestation in this period.