Single-pass epoch processing (#4483)

This commit is contained in:
Michael Sproul
2023-07-18 16:59:55 +10:00
committed by GitHub
parent 079cd67df2
commit 5d2063d262
42 changed files with 1558 additions and 730 deletions

View File

@@ -3,7 +3,7 @@ use crate::hdiff;
use crate::hot_cold_store::HotColdDBError;
use ssz::DecodeError;
use state_processing::BlockReplayError;
use types::{milhouse, BeaconStateError, Epoch, Hash256, InconsistentFork, Slot};
use types::{milhouse, BeaconStateError, Epoch, EpochCacheError, Hash256, InconsistentFork, Slot};
pub type Result<T> = std::result::Result<T, Error>;
@@ -71,6 +71,7 @@ pub enum Error {
Hdiff(hdiff::Error),
InconsistentFork(InconsistentFork),
ZeroCacheSize,
CacheBuildError(EpochCacheError),
}
pub trait HandleUnavailable<T> {
@@ -141,6 +142,12 @@ impl From<InconsistentFork> for Error {
}
}
impl From<EpochCacheError> for Error {
fn from(e: EpochCacheError) -> Error {
Error::CacheBuildError(e)
}
}
#[derive(Debug)]
pub struct DBError {
pub message: String,