pub enum BlockValidationResult {
    BLOCK_RESULT_UNSET,
    BLOCK_CONSENSUS,
    BLOCK_RECENT_CONSENSUS_CHANGE,
    BLOCK_CACHED_INVALID,
    BLOCK_INVALID_HEADER,
    BLOCK_MUTATED,
    BLOCK_MISSING_PREV,
    BLOCK_INVALID_PREV,
    BLOCK_TIME_FUTURE,
    BLOCK_CHECKPOINT,
}
Expand description

| A “reason” why a block was invalid, suitable | for determining whether the provider | of the block should be banned/ignored/disconnected/etc. | | These are much more granular than the | rejection codes, which may be more useful | for some other use-cases. |

Variants§

§

BLOCK_RESULT_UNSET

| initial value. Block has not yet been | rejected |

§

BLOCK_CONSENSUS

| invalid by consensus rules (excluding | any below reasons) |

§

BLOCK_RECENT_CONSENSUS_CHANGE

| Invalid by a change to consensus rules | more recent than SegWit. | | Currently unused as there are no such | consensus rule changes, and any download | sources realistically need to support | SegWit in order to provide useful data, | so differentiating between always-invalid | and invalid-by-pre-SegWit-soft-fork | is uninteresting. |

§

BLOCK_CACHED_INVALID

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

§

BLOCK_INVALID_HEADER

| invalid proof of work or time too old |

§

BLOCK_MUTATED

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

§

BLOCK_MISSING_PREV

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

§

BLOCK_INVALID_PREV

| A block this one builds on is invalid |

§

BLOCK_TIME_FUTURE

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

§

BLOCK_CHECKPOINT

| the block failed to meet one of our checkpoints |

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
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Performs the conversion. 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.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Convert type of a const pointer. Read more
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
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.