Chainstate::InvalidateBlock

Mark a block as invalid.

Synopsis

Declared in <validation.h>

[[requires_capability(0x7f9513ab4cc8), locks_excluded(0x7f9513ab4d98), requires_capability(0x7f9502c97d38), locks_excluded(0x7f9502c97e08), requires_capability(0x7f9525449a68), locks_excluded(0x7f9525449b38), requires_capability(0x7f95173ffd48), locks_excluded(0x7f95173ffe18)]]
bool
InvalidateBlock(
    BlockValidationState& state,
    CBlockIndex* pindex);

Return Value

true unless a system error occurred.

Parameters

NameDescription
stateValidation state updated with the reason for any failure.
pindexBlock index entry of the block to mark as invalid.