fix InvalidateBlock to repopulate setBlockIndexCandidates

Rebased-From: a9af415887
Github-Pull: #5879
pull/196/head
Alex Morcos 10 years ago committed by Wladimir J. van der Laan
parent 002c8a2411
commit c91c660e49
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6

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

Loading…
Cancel
Save