aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Morcos <morcos@chaincode.com>2015-03-12 16:03:23 -0400
committerAlex Morcos <morcos@chaincode.com>2015-03-13 13:11:11 -0400
commitcd3d67cf3b0d573d2c387c2ec35e8b52129863d9 (patch)
treeb9c8a454b4c9fbd8c0d3dc5df17b2cde3ddb0256 /src
parent7077fe6dd4208bdbd46940f7923b7d89202c3287 (diff)
downloadbitcoin-cd3d67cf3b0d573d2c387c2ec35e8b52129863d9.tar.xz
Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp2
1 files changed, 1 insertions, 1 deletions
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++;