diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-07-12 18:23:30 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-07-12 18:25:35 -0700 |
commit | e4fcbf797ed3b472d352ac3794ec82f581209c50 (patch) | |
tree | d99cb734d149476b03b6ea719305f64bf609eb64 /src/validation.cpp | |
parent | 479afa0f8486146a35f1fb96be1826061ecbcf23 (diff) | |
parent | 1e3a3200afd74b22fdbb5d9425722b0c031e7453 (diff) |
Merge #10780: Simplify "!foo || (foo && bar)" as "!foo || bar"
1e3a3200a Simplify "!foo || (foo && bar)" as "!foo || bar" (practicalswift)
Tree-SHA512: d5ce6d7a9f3741e7abe8542b840268aa683e276aac7587041d32385a4c1273e20c236bec7590e27540dde72defb3f879d4695822bb7bfdb092cc20d9aefa64c1
Diffstat (limited to 'src/validation.cpp')
-rw-r--r-- | src/validation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index a21367848b..16d11529b0 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) { |