Enum unc_primitives::errors::StorageError
source · pub enum StorageError {
StorageInternalError,
MissingTrieValue(MissingTrieValueContext, CryptoHash),
UnexpectedTrieValue,
StorageInconsistentState(String),
FlatStorageBlockNotSupported(String),
MemTrieLoadingError(String),
}Expand description
Errors which may occur during working with trie storages, storing trie values (trie nodes and state values) by their hashes.
Variants§
StorageInternalError
Key-value db internal failure
MissingTrieValue(MissingTrieValueContext, CryptoHash)
Requested trie value by its hash which is missing in storage.
UnexpectedTrieValue
Found trie node which shouldn’t be part of state. Raised during validation of state sync parts where incorrect node was passed. TODO (#8997): consider including hash of trie node.
StorageInconsistentState(String)
Either invalid state or key-value db is corrupted. For PartialStorage it cannot be corrupted. Error message is unreliable and for debugging purposes only. It’s also probably ok to panic in every place that produces this error. We can check if db is corrupted by verifying everything in the state trie.
FlatStorageBlockNotSupported(String)
Flat storage error, meaning that it doesn’t support some block anymore. We guarantee that such block cannot become final, thus block processing must resume normally.
MemTrieLoadingError(String)
In-memory trie could not be loaded for some reason.
Trait Implementations§
source§impl Clone for StorageError
impl Clone for StorageError
source§fn clone(&self) -> StorageError
fn clone(&self) -> StorageError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for StorageError
impl Debug for StorageError
source§impl Display for StorageError
impl Display for StorageError
source§impl Error for StorageError
impl Error for StorageError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<StorageError> for RuntimeError
impl From<StorageError> for RuntimeError
source§fn from(e: StorageError) -> Self
fn from(e: StorageError) -> Self
source§impl PartialEq for StorageError
impl PartialEq for StorageError
source§fn eq(&self, other: &StorageError) -> bool
fn eq(&self, other: &StorageError) -> bool
self and other values to be equal, and is used
by ==.impl Eq for StorageError
impl StructuralPartialEq for StorageError
Auto Trait Implementations§
impl Freeze for StorageError
impl RefUnwindSafe for StorageError
impl Send for StorageError
impl Sync for StorageError
impl Unpin for StorageError
impl UnwindSafe for StorageError
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
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
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
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
key and return true if they are equal.