Skip to content

Commit

Permalink
Auto merge of zcash#4019 - bitcartel:3992_remove_obsolete_warning, r=…
Browse files Browse the repository at this point in the history
…daira

Closes zcash#3992. Remove obsolete warning message.

Test plan: ensure that no message "%d of last 100 blocks above version %d" occurs in the log or on the metrics screen when syncing the block chain. Verify that this message *was* displayed previously for a sync from the same point.
  • Loading branch information
zkbot committed Jun 11, 2019
2 parents 5f40d5e + 346d11d commit dca403f
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2991,29 +2991,6 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) {
Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), chainActive.Tip()), pcoinsTip->DynamicMemoryUsage() * (1.0 / (1<<20)), pcoinsTip->GetCacheSize());

cvBlockChange.notify_all();

// Check the version of the last 100 blocks to see if we need to upgrade:
static bool fWarned = false;
if (!IsInitialBlockDownload(chainParams) && !fWarned)
{
int nUpgraded = 0;
const CBlockIndex* pindex = chainActive.Tip();
for (int i = 0; i < 100 && pindex != NULL; i++)
{
if (pindex->nVersion > CBlock::CURRENT_VERSION)
++nUpgraded;
pindex = pindex->pprev;
}
if (nUpgraded > 0)
LogPrintf("%s: %d of last 100 blocks above version %d\n", __func__, nUpgraded, (int)CBlock::CURRENT_VERSION);
if (nUpgraded > 100/2)
{
// strMiscWarning is read by GetWarnings(), called by the JSON-RPC code to warn the user:
strMiscWarning = _("Warning: This version is obsolete; upgrade required!");
CAlert::Notify(strMiscWarning, true);
fWarned = true;
}
}
}

/**
Expand Down

0 comments on commit dca403f

Please sign in to comment.