mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
* max_value -> MAX
* remove unnecesary closures
* a couple more max_value -> MAX
* a couple more max_value -> MAX
* Revert "a couple more max_value -> MAX"
This reverts commit 807fe7cae9.
* unused spec field -> phantom data
* ignore some dead code warnings
* update kurtosis repo location
58 lines
1.2 KiB
Rust
58 lines
1.2 KiB
Rust
use crate::blockprint::Error as BlockprintError;
|
|
use crate::database::Error as DbError;
|
|
use beacon_node::beacon_chain::BeaconChainError;
|
|
use eth2::{Error as Eth2Error, SensitiveError};
|
|
use std::fmt;
|
|
|
|
#[derive(Debug)]
|
|
#[allow(dead_code)]
|
|
pub enum Error {
|
|
BeaconChain(BeaconChainError),
|
|
Eth2(Eth2Error),
|
|
SensitiveUrl(SensitiveError),
|
|
Database(DbError),
|
|
Blockprint(BlockprintError),
|
|
UnableToGetRemoteHead,
|
|
BeaconNodeSyncing,
|
|
NotEnabled(String),
|
|
NoValidatorsFound,
|
|
BeaconNodeNotCompatible(String),
|
|
InvalidConfig(String),
|
|
}
|
|
|
|
impl fmt::Display for Error {
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
write!(f, "{:?}", self)
|
|
}
|
|
}
|
|
|
|
impl From<BeaconChainError> for Error {
|
|
fn from(e: BeaconChainError) -> Self {
|
|
Error::BeaconChain(e)
|
|
}
|
|
}
|
|
|
|
impl From<Eth2Error> for Error {
|
|
fn from(e: Eth2Error) -> Self {
|
|
Error::Eth2(e)
|
|
}
|
|
}
|
|
|
|
impl From<SensitiveError> for Error {
|
|
fn from(e: SensitiveError) -> Self {
|
|
Error::SensitiveUrl(e)
|
|
}
|
|
}
|
|
|
|
impl From<DbError> for Error {
|
|
fn from(e: DbError) -> Self {
|
|
Error::Database(e)
|
|
}
|
|
}
|
|
|
|
impl From<BlockprintError> for Error {
|
|
fn from(e: BlockprintError) -> Self {
|
|
Error::Blockprint(e)
|
|
}
|
|
}
|