From e6528c640c01fbf3c02f96bbf7f48bc9b412aa5f Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 24 Mar 2017 05:25:46 +0200 Subject: [PATCH] Test --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 182983673..5090b94fa 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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); }