Enum nakamoto_test::block::tree::Error
source · pub enum Error {
InvalidBlockPoW,
InvalidBlockTarget(Uint256, Uint256),
InvalidBlockHash(BlockHash, u64),
InvalidBlockHeight(u64),
InvalidBlockTime(u32, Ordering),
DuplicateBlock(BlockHash),
BlockMissing(BlockHash),
BlockImportAborted(Box<Error, Global>, usize, u64),
GenesisMismatch,
Store(Error),
Interrupted,
}
Expand description
An error related to the block tree.
Variants
InvalidBlockPoW
The block’s proof-of-work is invalid.
InvalidBlockTarget(Uint256, Uint256)
The block’s difficulty target is invalid.
InvalidBlockHash(BlockHash, u64)
The block’s hash doesn’t match the checkpoint.
InvalidBlockHeight(u64)
The block forks off the main chain prior to the last checkpoint.
InvalidBlockTime(u32, Ordering)
The block timestamp is invalid.
DuplicateBlock(BlockHash)
The block is already known.
BlockMissing(BlockHash)
The block is orphan.
BlockImportAborted(Box<Error, Global>, usize, u64)
A block import was aborted. FIXME: Move this error out of here.
GenesisMismatch
Mismatched genesis.
Store(Error)
A storage error occured.
Interrupted
The operation was interrupted.
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn 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 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more