fix InvalidateBlock to repopulate setBlockIndexCandidates

Rebased-From: a9af415887
Github-Pull: #5879
This commit is contained in:
Alex Morcos 2015-03-11 11:56:44 -04:00 committed by Wladimir J. van der Laan
parent 002c8a2411
commit c91c660e49
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6

View File

@ -2219,7 +2219,7 @@ bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) {
BlockMap::iterator it = mapBlockIndex.begin();
while (it != mapBlockIndex.end()) {
if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && setBlockIndexCandidates.value_comp()(chainActive.Tip(), it->second)) {
setBlockIndexCandidates.insert(pindex);
setBlockIndexCandidates.insert(it->second);
}
it++;
}