pub enum BlockHeaderConsistencyError {
NonZeroPrefixPadding,
InvalidShardIndex {
shard_index: ShardIndex,
shard_kind: RealShardKind,
},
NonZeroSolutionPadding,
SealPublicKeyHashMismatch {
solution_public_key_hash: Blake3Hash,
seal_public_key_hash: Blake3Hash,
},
}Expand description
Error for block header parts that are not consistent with each other or with the shard kind of the header.
Headers with such parts are rejected by parsing, and can’t be created from parts, whether as owned headers or written into a buffer.
Variants§
NonZeroPrefixPadding
Prefix padding is not all zeroes
InvalidShardIndex
Shard index is out of range or doesn’t correspond to the shard kind of the header
NonZeroSolutionPadding
Solution padding is not all zeroes
SealPublicKeyHashMismatch
Public key hash of the seal doesn’t match the solution
Fields
§
solution_public_key_hash: Blake3HashPublic key hash of the solution
§
seal_public_key_hash: Blake3HashPublic key hash of the seal
Trait Implementations§
Source§impl Clone for BlockHeaderConsistencyError
impl Clone for BlockHeaderConsistencyError
impl Copy for BlockHeaderConsistencyError
Source§impl Debug for BlockHeaderConsistencyError
impl Debug for BlockHeaderConsistencyError
impl Eq for BlockHeaderConsistencyError
Source§impl Error for BlockHeaderConsistencyError
impl Error for BlockHeaderConsistencyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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<BlockHeaderConsistencyError> for OwnedBeaconChainHeaderError
impl From<BlockHeaderConsistencyError> for OwnedBeaconChainHeaderError
Source§fn from(source: BlockHeaderConsistencyError) -> Self
fn from(source: BlockHeaderConsistencyError) -> Self
Converts to this type from the input type.
Source§impl From<BlockHeaderConsistencyError> for OwnedIntermediateShardHeaderError
impl From<BlockHeaderConsistencyError> for OwnedIntermediateShardHeaderError
Source§fn from(source: BlockHeaderConsistencyError) -> Self
fn from(source: BlockHeaderConsistencyError) -> Self
Converts to this type from the input type.
Source§impl From<BlockHeaderConsistencyError> for OwnedLeafShardHeaderError
impl From<BlockHeaderConsistencyError> for OwnedLeafShardHeaderError
Source§fn from(source: BlockHeaderConsistencyError) -> Self
fn from(source: BlockHeaderConsistencyError) -> Self
Converts to this type from the input type.
Source§impl From<BlockHeaderConsistencyError> for OwnedIntermediateShardBlockBuilderError
impl From<BlockHeaderConsistencyError> for OwnedIntermediateShardBlockBuilderError
Source§fn from(source: BlockHeaderConsistencyError) -> Self
fn from(source: BlockHeaderConsistencyError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for BlockHeaderConsistencyError
Auto Trait Implementations§
impl Forget for BlockHeaderConsistencyError
impl Freeze for BlockHeaderConsistencyError
impl RefUnwindSafe for BlockHeaderConsistencyError
impl Send for BlockHeaderConsistencyError
impl Sync for BlockHeaderConsistencyError
impl Unpin for BlockHeaderConsistencyError
impl UnsafeUnpin for BlockHeaderConsistencyError
impl UnwindSafe for BlockHeaderConsistencyError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more