pub enum ChainStateError {
OrphanBlock,
ValidationFailed(ConnectBlockError),
IndexError(BlockIndexError),
MissingBlockData(BlockHash),
ReorgFailed {
disconnected: u32,
reason: Box<ConnectBlockError>,
},
CorruptedIndex(BlockHash),
NoForkPoint,
}Expand description
Errors that can occur during chain state operations.
Variants§
OrphanBlock
The block’s parent is unknown (orphan block).
ValidationFailed(ConnectBlockError)
The block failed contextual validation.
IndexError(BlockIndexError)
The block index rejected the header.
MissingBlockData(BlockHash)
A block needed for reorg is missing from our block store.
ReorgFailed
Reorg failed — the chain state may be inconsistent.
Fields
§
reason: Box<ConnectBlockError>The error that stopped the reorg.
CorruptedIndex(BlockHash)
Block index is missing an entry that should exist (corrupted state).
NoForkPoint
Could not find fork point during reorg (no shared ancestor).
Trait Implementations§
Source§impl Debug for ChainStateError
impl Debug for ChainStateError
Source§impl Display for ChainStateError
impl Display for ChainStateError
Source§impl Error for ChainStateError
impl Error for ChainStateError
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<BlockIndexError> for ChainStateError
impl From<BlockIndexError> for ChainStateError
Source§fn from(e: BlockIndexError) -> Self
fn from(e: BlockIndexError) -> Self
Converts to this type from the input type.
Source§impl From<ChainStateError> for MiningError
impl From<ChainStateError> for MiningError
Source§fn from(e: ChainStateError) -> Self
fn from(e: ChainStateError) -> Self
Converts to this type from the input type.
Source§impl From<ConnectBlockError> for ChainStateError
impl From<ConnectBlockError> for ChainStateError
Source§fn from(e: ConnectBlockError) -> Self
fn from(e: ConnectBlockError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ChainStateError
impl RefUnwindSafe for ChainStateError
impl Send for ChainStateError
impl Sync for ChainStateError
impl Unpin for ChainStateError
impl UnsafeUnpin for ChainStateError
impl UnwindSafe for ChainStateError
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