Skip to content

Commit 09854d6

Browse files
sipaPastaPastaPasta
authored andcommitted
Merge bitcoin#10780: Simplify "!foo || (foo && bar)" as "!foo || bar"
1e3a320 Simplify "!foo || (foo && bar)" as "!foo || bar" (practicalswift) Tree-SHA512: d5ce6d7a9f3741e7abe8542b840268aa683e276aac7587041d32385a4c1273e20c236bec7590e27540dde72defb3f879d4695822bb7bfdb092cc20d9aefa64c1
1 parent 526036e commit 09854d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ static void CheckForkWarningConditionsOnNewFork(CBlockIndex* pindexNewForkTip)
13141314
// hash rate operating on the fork.
13151315
// We define it this way because it allows us to only store the highest fork tip (+ base) which meets
13161316
// the 7-block condition and from this always have the most-likely-to-cause-warning fork
1317-
if (pfork && (!pindexBestForkTip || (pindexBestForkTip && pindexNewForkTip->nHeight > pindexBestForkTip->nHeight)) &&
1317+
if (pfork && (!pindexBestForkTip || pindexNewForkTip->nHeight > pindexBestForkTip->nHeight) &&
13181318
pindexNewForkTip->nChainWork - pfork->nChainWork > (GetBlockProof(*pfork) * 7) &&
13191319
chainActive.Height() - pindexNewForkTip->nHeight < 72)
13201320
{

0 commit comments

Comments
 (0)