Don't warn about forks while fIsInitialDownload
This commit is contained in:
parent
dd30937ce3
commit
55ed3f1475
1 changed files with 5 additions and 0 deletions
|
@ -1421,6 +1421,11 @@ CBlockIndex *pindexBestForkTip = NULL, *pindexBestForkBase = NULL;
|
||||||
|
|
||||||
void CheckForkWarningConditions()
|
void CheckForkWarningConditions()
|
||||||
{
|
{
|
||||||
|
// Before we get past initial download, we cannot reliably alert about forks
|
||||||
|
// (we assume we don't get stuck on a fork before the last checkpoint)
|
||||||
|
if (IsInitialBlockDownload())
|
||||||
|
return;
|
||||||
|
|
||||||
// If our best fork is no longer within 72 blocks (+/- 12 hours if no one mines it)
|
// If our best fork is no longer within 72 blocks (+/- 12 hours if no one mines it)
|
||||||
// of our head, drop it
|
// of our head, drop it
|
||||||
if (pindexBestForkTip && nBestHeight - pindexBestForkTip->nHeight >= 72)
|
if (pindexBestForkTip && nBestHeight - pindexBestForkTip->nHeight >= 72)
|
||||||
|
|
Loading…
Reference in a new issue