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(ErrorString), 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(ErrorString)

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Returns the “name” of the error. Read more

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

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

Provides context for this failure. Read more

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

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

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

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

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

Returns the address of self. Read more

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

Returns the argument unchanged.

Calls U::from(self).

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

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

Returns the address of self. Read more

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

Should always be Self

The resulting type after obtaining ownership.

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

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.