validation: stop using BLOCK_FAILED_CHILD

even though we have a distinction between BLOCK_FAILED_VALID
and BLOCK_FAILED_CHILD in the codebase, we don't use it for
anything. since there's no functional difference between them
and it's unnecessary code complexity to categorise them correctly,
just mark as BLOCK_FAILED_VALID instead.
This commit is contained in:
stratospher
2025-01-16 16:55:28 +05:30
parent 120c631e16
commit 37bc207852
5 changed files with 6 additions and 14 deletions

View File

@@ -488,7 +488,7 @@ bool BlockManager::LoadBlockIndex(const std::optional<uint256>& snapshot_blockha
}
}
if (!(pindex->nStatus & BLOCK_FAILED_MASK) && pindex->pprev && (pindex->pprev->nStatus & BLOCK_FAILED_MASK)) {
pindex->nStatus |= BLOCK_FAILED_CHILD;
pindex->nStatus |= BLOCK_FAILED_VALID;
m_dirty_blockindex.insert(pindex);
}
if (pindex->pprev) {