aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-03-24 14:45:00 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-03-24 14:50:54 +0100
commit22cfe23196c5006d6dd79e1e1a24323148246bde (patch)
tree337aab27a85380e1a17f7113da80e2b703cb0580 /src/main.cpp
parent2afd919f212e8499d5549e29ac9b8a2d825873d9 (diff)
parentcd3d67cf3b0d573d2c387c2ec35e8b52129863d9 (diff)
Merge pull request #5890
cd3d67c Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates (Alex Morcos)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 94cf213490..aa6f904574 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2320,7 +2320,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++;