Skip to content

Commit f390d85

Browse files
committed
Prevent UpdateTip log message from being broken up
1 parent ca97d29 commit f390d85

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/validation.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2240,14 +2240,12 @@ void static UpdateTip(const CBlockIndex* pindexNew, const CChainParams& chainPar
22402240
if (nUpgraded > 0)
22412241
AppendWarning(warningMessages, strprintf(_("%d of last 100 blocks have unexpected version").translated, nUpgraded));
22422242
}
2243-
LogPrintf("%s: new best=%s height=%d version=0x%08x log2_work=%.8g tx=%lu date='%s' progress=%f cache=%.1fMiB(%utxo)", __func__, /* Continued */
2243+
LogPrintf("%s: new best=%s height=%d version=0x%08x log2_work=%.8g tx=%lu date='%s' progress=%f cache=%.1fMiB(%utxo)%s\n", __func__,
22442244
pindexNew->GetBlockHash().ToString(), pindexNew->nHeight, pindexNew->nVersion,
22452245
log(pindexNew->nChainWork.getdouble())/log(2.0), (unsigned long)pindexNew->nChainTx,
22462246
FormatISO8601DateTime(pindexNew->GetBlockTime()),
2247-
GuessVerificationProgress(chainParams.TxData(), pindexNew), ::ChainstateActive().CoinsTip().DynamicMemoryUsage() * (1.0 / (1<<20)), ::ChainstateActive().CoinsTip().GetCacheSize());
2248-
if (!warningMessages.empty())
2249-
LogPrintf(" warning='%s'", warningMessages); /* Continued */
2250-
LogPrintf("\n");
2247+
GuessVerificationProgress(chainParams.TxData(), pindexNew), ::ChainstateActive().CoinsTip().DynamicMemoryUsage() * (1.0 / (1<<20)), ::ChainstateActive().CoinsTip().GetCacheSize(),
2248+
!warningMessages.empty() ? strprintf(" warning='%s'", warningMessages) : "");
22512249

22522250
}
22532251

0 commit comments

Comments
 (0)