mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 12:58:31 +00:00
Single-pass epoch processing (#4483)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user