From cd3d67cf3b0d573d2c387c2ec35e8b52129863d9 Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Thu, 12 Mar 2015 16:03:23 -0400 Subject: Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 9b4bb43128..5207f60896 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2310,7 +2310,7 @@ bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) { // add them again. 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)) { + if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && !setBlockIndexCandidates.value_comp()(it->second, chainActive.Tip())) { setBlockIndexCandidates.insert(it->second); } it++; -- cgit v1.2.3