#[non_exhaustive]pub enum InvalidBlockError {
InvalidMerkleRoot,
InvalidWitnessCommitment,
NoTransactions,
InvalidCoinbase,
}Expand description
Invalid block error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidMerkleRoot
Header Merkle root does not match the calculated Merkle root.
InvalidWitnessCommitment
The witness commitment in coinbase transaction does not match the calculated witness_root.
NoTransactions
Block has no transactions (missing coinbase).
InvalidCoinbase
The first transaction is not a valid coinbase transaction.
Trait Implementations§
Source§impl Clone for InvalidBlockError
impl Clone for InvalidBlockError
Source§fn clone(&self) -> InvalidBlockError
fn clone(&self) -> InvalidBlockError
Returns a duplicate 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 InvalidBlockError
impl Debug for InvalidBlockError
Source§impl Display for InvalidBlockError
Available on crate feature alloc only.
impl Display for InvalidBlockError
Available on crate feature
alloc only.Source§impl Error for InvalidBlockError
Available on crate features alloc and std only.
impl Error for InvalidBlockError
Available on crate features
alloc and std only.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<Infallible> for InvalidBlockError
Available on crate feature alloc only.
impl From<Infallible> for InvalidBlockError
Available on crate feature
alloc only.Source§fn from(never: Infallible) -> Self
fn from(never: Infallible) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InvalidBlockError
impl PartialEq for InvalidBlockError
impl Eq for InvalidBlockError
impl StructuralPartialEq for InvalidBlockError
Auto Trait Implementations§
impl Freeze for InvalidBlockError
impl RefUnwindSafe for InvalidBlockError
impl Send for InvalidBlockError
impl Sync for InvalidBlockError
impl Unpin for InvalidBlockError
impl UnsafeUnpin for InvalidBlockError
impl UnwindSafe for InvalidBlockError
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