diff options
author | Alex Morcos <morcos@chaincode.com> | 2015-03-12 16:03:23 -0400 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-03-24 14:51:36 +0100 |
commit | 1d2cdd2ef9091508c42619c94d4a7106b1471a14 (patch) | |
tree | 794953d39e8053dc1fa7d29236be82f884731108 /src | |
parent | c9e022b7eee9f77cd33b333d6ff52f711d3bc989 (diff) | |
download | bitcoin-1d2cdd2ef9091508c42619c94d4a7106b1471a14.tar.xz |
Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates
Rebased-From: cd3d67cf3b0d573d2c387c2ec35e8b52129863d9
Github-Pull: #5890
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 8bedae6dd8..6418590462 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2228,7 +2228,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++; |