added missing dirty flag for invalid chain status update

This commit is contained in:
Brannon King 2020-08-04 23:32:38 -04:00
parent c9637f8e1c
commit e6945bba74

View file

@ -2560,6 +2560,7 @@ CBlockIndex* CChainState::FindMostWorkChain() {
while (pindexTest != pindexFailed) { while (pindexTest != pindexFailed) {
if (fFailedChain) { if (fFailedChain) {
pindexFailed->nStatus |= BLOCK_FAILED_CHILD; pindexFailed->nStatus |= BLOCK_FAILED_CHILD;
setDirtyBlockIndex.insert(pindexFailed);
} else if (fMissingData) { } else if (fMissingData) {
// If we're missing data, then add back to mapBlocksUnlinked, // If we're missing data, then add back to mapBlocksUnlinked,
// so that if the block arrives in the future we can try adding // so that if the block arrives in the future we can try adding