mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
validation: don't try to invalidate genesis block
This commit is contained in:
parent
7b975639ef
commit
787df19b09
1 changed files with 4 additions and 0 deletions
|
@ -2923,6 +2923,10 @@ bool PreciousBlock(BlockValidationState& state, const CChainParams& params, CBlo
|
|||
|
||||
bool CChainState::InvalidateBlock(BlockValidationState& state, const CChainParams& chainparams, CBlockIndex *pindex)
|
||||
{
|
||||
// Genesis block can't be invalidated
|
||||
assert(pindex);
|
||||
if (pindex->nHeight == 0) return false;
|
||||
|
||||
CBlockIndex* to_mark_failed = pindex;
|
||||
bool pindex_was_in_chain = false;
|
||||
int disconnected = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue