mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Merge #10780: Simplify "!foo || (foo && bar)" as "!foo || bar"
1e3a3200a
Simplify "!foo || (foo && bar)" as "!foo || bar" (practicalswift)
Tree-SHA512: d5ce6d7a9f3741e7abe8542b840268aa683e276aac7587041d32385a4c1273e20c236bec7590e27540dde72defb3f879d4695822bb7bfdb092cc20d9aefa64c1
This commit is contained in:
commit
e4fcbf797e
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user