Enum casper_node::types::error::BlockValidationError
source · pub enum BlockValidationError {
BytesReprError(Error),
UnexpectedBodyHash {
block: Box<Block>,
actual_block_body_hash: Digest,
},
UnexpectedBlockHash {
block: Box<Block>,
actual_block_header_hash: BlockHash,
},
UnexpectedDeployHash {
block: Box<Block>,
invalid_deploy: Box<Deploy>,
deploy_configuration_failure: DeployConfigurationFailure,
},
MissingDeploy {
block: Box<Block>,
missing_deploy: DeployHash,
},
ExtraDeploys {
block: Box<Block>,
extra_deploys_count: u32,
},
}
Expand description
An error that can arise when validating a block’s cryptographic integrity using its hashes.
Variants§
BytesReprError(Error)
Problem serializing some of a block’s data into bytes.
UnexpectedBodyHash
Fields
The body hash in the header is not the same as the hash of the body of the block.
UnexpectedBlockHash
Fields
The block’s hash is not the same as the header’s hash.
UnexpectedDeployHash
Fields
§
deploy_configuration_failure: DeployConfigurationFailure
The error.
A deploy’s hash does not match the hash listed in the BlockAndDeploys
body.
MissingDeploy
Fields
§
missing_deploy: DeployHash
The DeployHash
of the missing Deploy
.
A deploy is missing from a BlockAndDeploys
.
ExtraDeploys
Fields
At least one extra deploy is present in a BlockAndDeploys
.
Trait Implementations§
source§impl Clone for BlockValidationError
impl Clone for BlockValidationError
source§fn clone(&self) -> BlockValidationError
fn clone(&self) -> BlockValidationError
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 DataSize for BlockValidationError
impl DataSize for BlockValidationError
source§const IS_DYNAMIC: bool = true
const IS_DYNAMIC: bool = true
If
true
, the type has a heap size that can vary at runtime, depending on the actual value.source§const STATIC_HEAP_SIZE: usize = 0usize
const STATIC_HEAP_SIZE: usize = 0usize
The amount of space a value of the type always occupies. If
IS_DYNAMIC
is false, this is
the total amount of heap memory occupied by the value. Otherwise this is a lower bound.source§fn estimate_heap_size(&self) -> usize
fn estimate_heap_size(&self) -> usize
Estimates the size of heap memory taken up by this value. Read more
source§fn estimate_detailed_heap_size(&self) -> MemUsageNode
fn estimate_detailed_heap_size(&self) -> MemUsageNode
Create a tree of memory estimations. Read more
source§impl Debug for BlockValidationError
impl Debug for BlockValidationError
source§impl Display for BlockValidationError
impl Display for BlockValidationError
source§impl Error for BlockValidationError
impl Error for BlockValidationError
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<BlockValidationError> for FatalStorageError
impl From<BlockValidationError> for FatalStorageError
source§fn from(source: BlockValidationError) -> Self
fn from(source: BlockValidationError) -> Self
Converts to this type from the input type.
source§impl From<Error> for BlockValidationError
impl From<Error> for BlockValidationError
source§impl PartialEq for BlockValidationError
impl PartialEq for BlockValidationError
source§fn eq(&self, other: &BlockValidationError) -> bool
fn eq(&self, other: &BlockValidationError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for BlockValidationError
impl Serialize for BlockValidationError
impl Eq for BlockValidationError
impl StructuralPartialEq for BlockValidationError
Auto Trait Implementations§
impl RefUnwindSafe for BlockValidationError
impl Send for BlockValidationError
impl Sync for BlockValidationError
impl Unpin for BlockValidationError
impl UnwindSafe for BlockValidationError
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.