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

@@ -4,6 +4,9 @@ use crate::hot_cold_store::HotColdDBError;
use ssz::DecodeError;
use types::{BeaconStateError, Hash256, Slot};
#[cfg(feature = "milhouse")]
use types::milhouse;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug)]
@@ -39,6 +42,8 @@ pub enum Error {
expected: Hash256,
computed: Hash256,
},
#[cfg(feature = "milhouse")]
MilhouseError(milhouse::Error),
}
pub trait HandleUnavailable<T> {
@@ -91,6 +96,13 @@ impl From<StoreConfigError> for Error {
}
}
#[cfg(feature = "milhouse")]
impl From<milhouse::Error> for Error {
fn from(e: milhouse::Error) -> Self {
Self::MilhouseError(e)
}
}
#[derive(Debug)]
pub struct DBError {
pub message: String,