@@ -2441,9 +2441,9 @@ static void UpdateTip(CTxMemPool& mempool, const CBlockIndex* pindexNew, const C
2441
2441
}
2442
2442
2443
2443
bilingual_str warning_messages;
2444
+ int num_unexpected_version = 0 ;
2444
2445
if (!::ChainstateActive ().IsInitialBlockDownload ())
2445
2446
{
2446
- int nUpgraded = 0 ;
2447
2447
const CBlockIndex* pindex = pindexNew;
2448
2448
for (int bit = 0 ; bit < VERSIONBITS_NUM_BITS; bit++) {
2449
2449
WarningBitsConditionChecker checker (bit);
@@ -2462,18 +2462,20 @@ static void UpdateTip(CTxMemPool& mempool, const CBlockIndex* pindexNew, const C
2462
2462
{
2463
2463
int32_t nExpectedVersion = ComputeBlockVersion (pindex->pprev , chainParams.GetConsensus ());
2464
2464
if (pindex->nVersion > VERSIONBITS_LAST_OLD_BLOCK_VERSION && (pindex->nVersion & ~nExpectedVersion) != 0 )
2465
- ++nUpgraded ;
2465
+ ++num_unexpected_version ;
2466
2466
pindex = pindex->pprev ;
2467
2467
}
2468
- if (nUpgraded > 0 )
2469
- AppendWarning (warning_messages, strprintf (_ (" %d of last 100 blocks have unexpected version" ), nUpgraded));
2470
2468
}
2471
2469
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__,
2472
2470
pindexNew->GetBlockHash ().ToString (), pindexNew->nHeight , pindexNew->nVersion ,
2473
2471
log (pindexNew->nChainWork .getdouble ())/log (2.0 ), (unsigned long )pindexNew->nChainTx ,
2474
2472
FormatISO8601DateTime (pindexNew->GetBlockTime ()),
2475
2473
GuessVerificationProgress (chainParams.TxData (), pindexNew), ::ChainstateActive ().CoinsTip ().DynamicMemoryUsage () * (1.0 / (1 <<20 )), ::ChainstateActive ().CoinsTip ().GetCacheSize (),
2476
2474
!warning_messages.empty () ? strprintf (" warning='%s'" , warning_messages.original ) : " " );
2475
+
2476
+ if (num_unexpected_version > 0 ) {
2477
+ LogPrint (BCLog::VALIDATION, " %d of last 100 blocks have unexpected version\n " , num_unexpected_version);
2478
+ }
2477
2479
}
2478
2480
2479
2481
/* * Disconnect m_chain's tip.
0 commit comments