diff --git a/src/validation.cpp b/src/validation.cpp --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2128,9 +2128,6 @@ * block to the chain tip. */ static void UpdateTip(const Config &config, CBlockIndex *pindexNew) { - const Consensus::Params &consensusParams = - config.GetChainParams().GetConsensus(); - chainActive.SetTip(pindexNew); // New best block @@ -2142,42 +2139,8 @@ g_best_block_cv.notify_all(); } - static bool fWarned = false; - std::vector warningMessages; - if (!IsInitialBlockDownload()) { - int nUpgraded = 0; - const CBlockIndex *pindex = chainActive.Tip(); - - // Check the version of the last 100 blocks to see if we need to - // upgrade: - for (int i = 0; i < 100 && pindex != nullptr; i++) { - int32_t nExpectedVersion = - ComputeBlockVersion(pindex->pprev, consensusParams); - if (pindex->nVersion > VERSIONBITS_LAST_OLD_BLOCK_VERSION && - (pindex->nVersion & ~nExpectedVersion) != 0) { - ++nUpgraded; - } - pindex = pindex->pprev; - } - if (nUpgraded > 0) { - warningMessages.push_back(strprintf( - "%d of last 100 blocks have unexpected version", nUpgraded)); - } - if (nUpgraded > 100 / 2) { - std::string strWarning = - _("Warning: Unknown block versions being mined! It's possible " - "unknown rules are in effect"); - // notify GetWarnings(), called by Qt and the JSON-RPC code to warn - // the user: - SetMiscWarning(strWarning); - if (!fWarned) { - AlertNotify(strWarning); - fWarned = true; - } - } - } LogPrintf("%s: new best=%s height=%d version=0x%08x log2_work=%.8g tx=%lu " - "date='%s' progress=%f cache=%.1fMiB(%utxo)", + "date='%s' progress=%f cache=%.1fMiB(%utxo)\n", __func__, chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), chainActive.Tip()->nVersion, log(chainActive.Tip()->nChainWork.getdouble()) / log(2.0), @@ -2187,11 +2150,6 @@ chainActive.Tip()), pcoinsTip->DynamicMemoryUsage() * (1.0 / (1 << 20)), pcoinsTip->GetCacheSize()); - if (!warningMessages.empty()) { - LogPrintf(" warning='%s'", - boost::algorithm::join(warningMessages, ", ")); - } - LogPrintf("\n"); } /**