diff --git a/src/validation.cpp b/src/validation.cpp index 8cb8cc2cbde9a1..5980745cf87267 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2711,7 +2711,6 @@ void CChainState::UpdateTip(const CBlockIndex* pindexNew) assert(std::addressof(::ChainstateActive()) == std::addressof(*this)); if (!this->IsInitialBlockDownload()) { - int nUpgraded = 0; const CBlockIndex* pindex = pindexNew; for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { WarningBitsConditionChecker checker(bit); @@ -2725,16 +2724,6 @@ void CChainState::UpdateTip(const CBlockIndex* pindexNew) } } } - // 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, m_params.GetConsensus()); - if (pindex->nVersion > VERSIONBITS_LAST_OLD_BLOCK_VERSION && (pindex->nVersion & ~nExpectedVersion) != 0) - ++nUpgraded; - pindex = pindex->pprev; - } - if (nUpgraded > 0) - AppendWarning(warningMessages, strprintf(_("%d of last 100 blocks have unexpected version").translated, nUpgraded)); } assert(std::addressof(::ChainstateActive()) == std::addressof(*this)); LogPrintf("%s: new best=%s height=%d version=0x%08x log2_work=%.8g tx=%lu date='%s' progress=%f cache=%.1fMiB(%utxo) evodb_cache=%.1fMiB%s\n", __func__,