pub enum FlatChainstoreError {
Io(Error),
BlockNotFound,
IndexIsFull,
DbTooNew(u32),
Poisoned,
InvalidMagic(u32),
AccumulatorTooBig,
IndexTooBig,
InvalidMetadataPointer,
DbCorrupted,
InvalidValidationIndex,
}Expand description
An error that can happen when we’re dealing with our flat chain store
Variants§
Io(Error)
An I/O error happened
Check the inner error for more information
BlockNotFound
We couldn’t find the block we were looking for
IndexIsFull
The index is full, we can’t add more blocks to it
DbTooNew(u32)
Tried to open a database with an unsupported version number
Poisoned
Our cache lock is poisoned
InvalidMagic(u32)
We encountered an invalid magic value, possibly database corruption
AccumulatorTooBig
The provided accumulator is too big
IndexTooBig
Tried to create an index more than 31 bits long
InvalidMetadataPointer
Something wrong happened with the metadata file mmap
DbCorrupted
The database is corrupted
InvalidValidationIndex
The validation index doesn’t have a height. This probably means it is in a fork or invalid chain
Trait Implementations§
Source§impl Debug for FlatChainstoreError
impl Debug for FlatChainstoreError
Source§impl From<Error> for FlatChainstoreError
impl From<Error> for FlatChainstoreError
Source§impl From<PoisonError<MutexGuard<'_, LruCache<BlockHash, DiskBlockHeader>>>> for FlatChainstoreError
impl From<PoisonError<MutexGuard<'_, LruCache<BlockHash, DiskBlockHeader>>>> for FlatChainstoreError
Source§fn from(
_: PoisonError<MutexGuard<'_, LruCache<BlockHash, DiskBlockHeader>>>,
) -> Self
fn from( _: PoisonError<MutexGuard<'_, LruCache<BlockHash, DiskBlockHeader>>>, ) -> Self
Converts to this type from the input type.
impl DatabaseError for FlatChainstoreError
Need this to use FlatChainstoreError as a DatabaseError in ChainStore
Auto Trait Implementations§
impl Freeze for FlatChainstoreError
impl !RefUnwindSafe for FlatChainstoreError
impl Send for FlatChainstoreError
impl Sync for FlatChainstoreError
impl Unpin for FlatChainstoreError
impl !UnwindSafe for FlatChainstoreError
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