Enum unc_primitives::errors::BlockError
source · pub enum BlockError {
ThresholdError {
pledge_sum: Balance,
num_seats: u64,
},
BlockOutOfBounds(CryptoHash),
MissingBlock(CryptoHash),
IOErr(String),
NotAValidator(AccountId, BlockHeight),
ShardingError(String),
NotEnoughValidators {
num_validators: u64,
num_shards: u64,
},
ChunkValidatorSelectionError(String),
ValidatorTotalPowerError(String),
NoAvailableValidator(String),
}Variants§
ThresholdError
Error calculating threshold from given pledges for given number of seats. Only should happened if calling code doesn’t check for integer value of pledge > number of seats.
BlockOutOfBounds(CryptoHash)
Requesting validators for an epoch that wasn’t computed yet.
MissingBlock(CryptoHash)
Missing block hash in the storage (means there is some structural issue).
IOErr(String)
Error due to IO (DB read/write, serialization, etc.).
NotAValidator(AccountId, BlockHeight)
Given account ID is not a validator in the given block height.
ShardingError(String)
Error getting information for a shard
NotEnoughValidators
ChunkValidatorSelectionError(String)
Error selecting validators for a chunk.
ValidatorTotalPowerError(String)
ValidatorTotalPowerError
NoAvailableValidator(String)
NoAvailableValidator
Trait Implementations§
source§impl Clone for BlockError
impl Clone for BlockError
source§fn clone(&self) -> BlockError
fn clone(&self) -> BlockError
Returns a copy 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 BlockError
impl Debug for BlockError
source§impl Display for BlockError
impl Display for BlockError
source§impl Error for BlockError
impl Error for BlockError
1.30.0 · source§fn 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 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<BlockError> for EpochError
impl From<BlockError> for EpochError
source§fn from(error: BlockError) -> Self
fn from(error: BlockError) -> Self
Converts to this type from the input type.
source§impl From<EpochError> for BlockError
impl From<EpochError> for BlockError
source§fn from(error: EpochError) -> Self
fn from(error: EpochError) -> Self
Converts to this type from the input type.
source§impl From<Error> for BlockError
impl From<Error> for BlockError
source§impl PartialEq for BlockError
impl PartialEq for BlockError
source§fn eq(&self, other: &BlockError) -> bool
fn eq(&self, other: &BlockError) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for BlockError
impl StructuralPartialEq for BlockError
Auto Trait Implementations§
impl Freeze for BlockError
impl RefUnwindSafe for BlockError
impl Send for BlockError
impl Sync for BlockError
impl Unpin for BlockError
impl UnwindSafe for BlockError
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
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
Compare self to
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
Compare self to
key and return true if they are equal.