aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpracticalswift <[email protected]>2017-07-09 13:35:39 +0200
committerpracticalswift <[email protected]>2017-07-09 13:39:58 +0200
commit1e3a3200afd74b22fdbb5d9425722b0c031e7453 (patch)
tree786e3fa33f8e7ef7e34030f1e727125cbe02875a /src
parentMerge #10759: Fix multi_rpc test for hosts that dont default to utf8 (diff)
downloaddiscoin-1e3a3200afd74b22fdbb5d9425722b0c031e7453.tar.xz
discoin-1e3a3200afd74b22fdbb5d9425722b0c031e7453.zip
Simplify "!foo || (foo && bar)" as "!foo || bar"
Diffstat (limited to 'src')
-rw-r--r--src/validation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 09288be1c..6aa50a4da 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -1141,7 +1141,7 @@ static void CheckForkWarningConditionsOnNewFork(CBlockIndex* pindexNewForkTip)
// or a chain that is entirely longer than ours and invalid (note that this should be detected by both)
// We define it this way because it allows us to only store the highest fork tip (+ base) which meets
// the 7-block condition and from this always have the most-likely-to-cause-warning fork
- if (pfork && (!pindexBestForkTip || (pindexBestForkTip && pindexNewForkTip->nHeight > pindexBestForkTip->nHeight)) &&
+ if (pfork && (!pindexBestForkTip || pindexNewForkTip->nHeight > pindexBestForkTip->nHeight) &&
pindexNewForkTip->nChainWork - pfork->nChainWork > (GetBlockProof(*pfork) * 7) &&
chainActive.Height() - pindexNewForkTip->nHeight < 72)
{