Enum ErrorKind

Source
pub enum ErrorKind {
Show 42 variants Unfit(String), Orphan, DifficultyTooLow, DifficultyTooHigh, WrongTotalDifficulty, LowEdgebits, InvalidScaling, InvalidPow, OldBlock, InvalidBlockProof(Error), InvalidBlockTime, InvalidBlockHeight, InvalidRoot, InvalidMMRSize, Keychain(Error), Secp(Error), AlreadySpent(Commitment), DuplicateCommitment(Commitment), ImmatureCoinbase, MerkleProof, OutputNotFound, RangeproofNotFound, TxKernelNotFound, OutputSpent, InvalidBlockVersion(HeaderVersion), InvalidTxHashSet(String), StoreErr(Error, String), FileReadErr(String), SerErr(Error), TxHashSetErr(String), TxLockHeight, GenesisBlockRequired, Transaction(Error), Other(String), Committed(Error), Stopped, Bitmap, SyncError(String), InvalidSortAlgo, ThereIsNotPolicy, PolicyIsNotAllowed, InvalidSeed,
}
Expand description

Chain error definitions

Variants§

§

Unfit(String)

The block doesn’t fit anywhere in our chain

§

Orphan

Special case of orphan blocks

§

DifficultyTooLow

Difficulty is too low either compared to ours or the block PoW hash

§

DifficultyTooHigh

§

WrongTotalDifficulty

Addition of difficulties on all previous block is wrong

§

LowEdgebits

Block header edge_bits is lower than our min

§

InvalidScaling

Scaling factor between primary and secondary PoW is invalid

§

InvalidPow

The proof of work is invalid

§

OldBlock

Peer abusively sending us an old block we already have

§

InvalidBlockProof(Error)

The block doesn’t sum correctly or a tx signature is invalid

§

InvalidBlockTime

Block time is too old

§

InvalidBlockHeight

Block height is invalid (not previous + 1)

§

InvalidRoot

One of the root hashes in the block is invalid

§

InvalidMMRSize

One of the MMR sizes in the block header is invalid

§

Keychain(Error)

Error from underlying keychain impl

§

Secp(Error)

Error from underlying secp lib

§

AlreadySpent(Commitment)

One of the inputs in the block has already been spent

§

DuplicateCommitment(Commitment)

An output with that commitment already exists (should be unique)

§

ImmatureCoinbase

Attempt to spend a coinbase output before it sufficiently matures.

§

MerkleProof

Error validating a Merkle proof (coinbase output)

§

OutputNotFound

Output not found

§

RangeproofNotFound

Rangeproof not found

§

TxKernelNotFound

Tx kernel not found

§

OutputSpent

output spent

§

InvalidBlockVersion(HeaderVersion)

Invalid block version, either a mistake or outdated software

§

InvalidTxHashSet(String)

We’ve been provided a bad txhashset

§

StoreErr(Error, String)

Internal issue when trying to save or load data from store

§

FileReadErr(String)

Internal issue when trying to save or load data from append only files

§

SerErr(Error)

Error serializing or deserializing a type

§

TxHashSetErr(String)

Error with the txhashset

§

TxLockHeight

Tx not valid based on lock_height.

§

GenesisBlockRequired

No chain exists and genesis block is required

§

Transaction(Error)

Error from underlying tx handling

§

Other(String)

Anything else

§

Committed(Error)

Error from summing and verifying kernel sums via committed trait.

§

Stopped

We cannot process data once the Epic server has been stopped.

§

Bitmap

Internal Roaring Bitmap error

§

SyncError(String)

Error during chain sync

§

InvalidSortAlgo

comment here

§

ThereIsNotPolicy

comment here

§

PolicyIsNotAllowed

§

InvalidSeed

Trait Implementations§

Source§

impl Clone for ErrorKind

Source§

fn clone(&self) -> ErrorKind

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Fail for ErrorKind

Source§

fn name(&self) -> Option<&str>

Returns the “name” of the error. Read more
Source§

fn cause(&self) -> Option<&dyn Fail>

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more
Source§

fn context<D>(self, context: D) -> Context<D>
where D: Display + Send + Sync + 'static, Self: Sized,

Provides context for this failure. Read more
Source§

fn compat(self) -> Compat<Self>
where Self: Sized,

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more
Source§

impl From<ErrorKind> for Error

Source§

fn from(kind: ErrorKind) -> Error

Converts to this type from the input type.
Source§

impl PartialEq for ErrorKind

Source§

fn eq(&self, other: &ErrorKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for ErrorKind

Source§

impl StructuralPartialEq for ErrorKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsFail for T
where T: Fail,

Source§

fn as_fail(&self) -> &(dyn Fail + 'static)

Converts a reference to Self into a dynamic trait object of Fail.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneAny for T
where T: Any + Clone,

Source§

fn clone_any(&self) -> Box<dyn CloneAny>

Source§

fn clone_any_send(&self) -> Box<dyn CloneAny + Send>
where T: Send,

Source§

fn clone_any_sync(&self) -> Box<dyn CloneAny + Sync>
where T: Sync,

Source§

fn clone_any_send_sync(&self) -> Box<dyn CloneAny + Sync + Send>
where T: Send + Sync,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<'a, T> DefaultFeatures<'a> for T
where T: 'a + Send + Sync + Clone,

Source§

fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>

Clone this value, and then immediately put it into a Box behind a trait object of this trait.
Source§

fn self_address_mut(&mut self) -> *mut ()

Returns the address of self. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'a, T> NonSyncFeatures<'a> for T
where T: 'a + Clone,

Source§

fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>

Clone this value, and then immediately put it into a Box behind a trait object of this trait.
Source§

fn self_address_mut(&mut self) -> *mut ()

Returns the address of self. Read more
Source§

impl<T> SafeBorrow<T> for T
where T: ?Sized,

Source§

fn borrow_replacement(ptr: &T) -> &T

Given ptr, which was obtained from a prior call to Self::borrow(), return a value with the same nominal lifetime which is guaranteed to survive mutations to Self. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DebugAny for T
where T: Any + Debug,

Source§

impl<T> Erased for T

Source§

impl<T> UnsafeAny for T
where T: Any,