Enum BlockValidationResult

Source
pub enum BlockValidationResult {
    RESULT_UNSET = 0,
    CONSENSUS = 1,
    CACHED_INVALID = 2,
    INVALID_HEADER = 3,
    MUTATED = 4,
    MISSING_PREV = 5,
    INVALID_PREV = 6,
    TIME_FUTURE = 7,
    HEADER_LOW_WORK = 8,
}
Expand description

A granular reason why a block was invalid.

Variants§

§

RESULT_UNSET = 0

initial value. Block has not yet been rejected

§

CONSENSUS = 1

invalid by consensus rules (excluding any below reasons)

§

CACHED_INVALID = 2

this block was cached as being invalid and we didn’t store the reason why

§

INVALID_HEADER = 3

invalid proof of work or time too old

§

MUTATED = 4

the block’s data didn’t match the data committed to by the PoW

§

MISSING_PREV = 5

We don’t have the previous block the checked one is built on

§

INVALID_PREV = 6

A block this one builds on is invalid

§

TIME_FUTURE = 7

block timestamp was > 2 hours in the future (or our clock is bad)

§

HEADER_LOW_WORK = 8

the block header may be on a too-little-work chain

Trait Implementations§

Source§

impl From<u32> for BlockValidationResult

Source§

fn from(res: kernel_BlockValidationResult) -> Self

Converts to this type from the input type.

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> 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> 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<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.