This commit is contained in:
jl777
2017-03-24 05:25:46 +02:00
parent 129d39b037
commit e6528c640c

View File

@@ -3033,7 +3033,7 @@ bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) {
// The resulting new best tip may not be in setBlockIndexCandidates anymore, so
// add it again.
BlockMap::iterator it = mapBlockIndex.begin();
while (it != mapBlockIndex.end()) {
while (it != mapBlockIndex.end() && it->second != 0 ) {
if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && !setBlockIndexCandidates.value_comp()(it->second, chainActive.Tip())) {
setBlockIndexCandidates.insert(it->second);
}