Chainstate::InvalidateBlock

Mark a block as invalid.

Synopsis

Declared in <validation.h>

[[requires_capability(0x7fbc8fb665a8), locks_excluded(0x7fbc8fb66678), requires_capability(0x7fbc96bfec18), locks_excluded(0x7fbc96bfece8), requires_capability(0x7fbcaf5d6028), locks_excluded(0x7fbcaf5d60f8), requires_capability(0x7fbc9e0dc7f8), locks_excluded(0x7fbc9e0dc8c8)]]
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.