@@ -2449,9 +2449,7 @@ static void UpdateTip(CTxMemPool& mempool, const CBlockIndex* pindexNew, const C
2449
2449
}
2450
2450
2451
2451
bilingual_str warning_messages;
2452
- int num_unexpected_version = 0 ;
2453
- if (!::ChainstateActive ().IsInitialBlockDownload ())
2454
- {
2452
+ if (!::ChainstateActive ().IsInitialBlockDownload ()) {
2455
2453
const CBlockIndex* pindex = pindexNew;
2456
2454
for (int bit = 0 ; bit < VERSIONBITS_NUM_BITS; bit++) {
2457
2455
WarningBitsConditionChecker checker (bit);
@@ -2465,25 +2463,13 @@ static void UpdateTip(CTxMemPool& mempool, const CBlockIndex* pindexNew, const C
2465
2463
}
2466
2464
}
2467
2465
}
2468
- // Check the version of the last 100 blocks to see if we need to upgrade:
2469
- for (int i = 0 ; i < 100 && pindex != nullptr ; i++)
2470
- {
2471
- int32_t nExpectedVersion = ComputeBlockVersion (pindex->pprev , chainParams.GetConsensus ());
2472
- if (pindex->nVersion > VERSIONBITS_LAST_OLD_BLOCK_VERSION && (pindex->nVersion & ~nExpectedVersion) != 0 )
2473
- ++num_unexpected_version;
2474
- pindex = pindex->pprev ;
2475
- }
2476
2466
}
2477
2467
LogPrintf (" %s: new best=%s height=%d version=0x%08x log2_work=%f tx=%lu date='%s' progress=%f cache=%.1fMiB(%utxo)%s\n " , __func__,
2478
2468
pindexNew->GetBlockHash ().ToString (), pindexNew->nHeight , pindexNew->nVersion ,
2479
2469
log (pindexNew->nChainWork .getdouble ())/log (2.0 ), (unsigned long )pindexNew->nChainTx ,
2480
2470
FormatISO8601DateTime (pindexNew->GetBlockTime ()),
2481
2471
GuessVerificationProgress (chainParams.TxData (), pindexNew), ::ChainstateActive ().CoinsTip ().DynamicMemoryUsage () * (1.0 / (1 <<20 )), ::ChainstateActive ().CoinsTip ().GetCacheSize (),
2482
2472
!warning_messages.empty () ? strprintf (" warning='%s'" , warning_messages.original ) : " " );
2483
-
2484
- if (num_unexpected_version > 0 ) {
2485
- LogPrint (BCLog::VALIDATION, " %d of last 100 blocks have unexpected version\n " , num_unexpected_version);
2486
- }
2487
2473
}
2488
2474
2489
2475
/* * Disconnect m_chain's tip.
0 commit comments