Enum ckb_verification::EpochError
source · pub enum EpochError {
Malformed {
value: EpochNumberWithFraction,
},
NonContinuous {
current: EpochNumberWithFraction,
parent: EpochNumberWithFraction,
},
TargetMismatch {
expected: u32,
actual: u32,
},
NumberMismatch {
expected: u64,
actual: u64,
},
}Expand description
Errors due to the fact that the block epoch is not expected.
Variants§
Malformed
Fields
§
value: EpochNumberWithFractionThe malformed header epoch.
The format of header epoch is malformed.
NonContinuous
Fields
§
current: EpochNumberWithFractionThe current header epoch.
§
parent: EpochNumberWithFractionThe parent header epoch.
The header epoch is not continuous.
TargetMismatch
Fields
The compact-target of block epoch is unexpected.
NumberMismatch
Fields
The number of block epoch is unexpected.
Trait Implementations§
source§impl Clone for EpochError
impl Clone for EpochError
source§fn clone(&self) -> EpochError
fn clone(&self) -> EpochError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for EpochError
impl Debug for EpochError
source§impl Display for EpochError
impl Display for EpochError
source§impl Error for EpochError
impl Error for EpochError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<EpochError> for Error
impl From<EpochError> for Error
source§fn from(error: EpochError) -> Self
fn from(error: EpochError) -> Self
Converts to this type from the input type.
source§impl From<EpochError> for HeaderError
impl From<EpochError> for HeaderError
source§fn from(error: EpochError) -> Self
fn from(error: EpochError) -> Self
Converts to this type from the input type.
source§impl PartialEq<EpochError> for EpochError
impl PartialEq<EpochError> for EpochError
source§fn eq(&self, other: &EpochError) -> bool
fn eq(&self, other: &EpochError) -> bool
This method tests for
self and other values to be equal, and is used
by ==.