@@ -1666,7 +1666,7 @@ bool UndoReadFromDisk(CBlockUndo& blockundo, const CBlockIndex* pindex)
1666
1666
// TODO: AbortNode() should take bilingual_str userMessage parameter.
1667
1667
static bool AbortNode (const std::string& strMessage, const std::string& userMessage = " " , unsigned int prefix = 0 )
1668
1668
{
1669
- SetMiscWarning (strMessage);
1669
+ SetMiscWarning (Untranslated ( strMessage) );
1670
1670
LogPrintf (" *** %s\n " , strMessage);
1671
1671
if (!userMessage.empty ()) {
1672
1672
uiInterface.ThreadSafeMessageBox (Untranslated (userMessage), " " , CClientUIInterface::MSG_ERROR | prefix);
@@ -2429,20 +2429,20 @@ void CChainState::PruneAndFlush() {
2429
2429
}
2430
2430
}
2431
2431
2432
- static void DoWarning (const std::string& strWarning )
2432
+ static void DoWarning (const bilingual_str& warning )
2433
2433
{
2434
2434
static bool fWarned = false ;
2435
- SetMiscWarning (strWarning );
2435
+ SetMiscWarning (warning );
2436
2436
if (!fWarned ) {
2437
- AlertNotify (strWarning );
2437
+ AlertNotify (warning. original );
2438
2438
fWarned = true ;
2439
2439
}
2440
2440
}
2441
2441
2442
2442
/* * Private helper function that concatenates warning messages. */
2443
- static void AppendWarning (std::string & res, const std::string & warn)
2443
+ static void AppendWarning (bilingual_str & res, const bilingual_str & warn)
2444
2444
{
2445
- if (!res.empty ()) res += " , " ;
2445
+ if (!res.empty ()) res += Untranslated ( " , " ) ;
2446
2446
res += warn;
2447
2447
}
2448
2448
@@ -2459,7 +2459,7 @@ void static UpdateTip(const CBlockIndex* pindexNew, const CChainParams& chainPar
2459
2459
g_best_block_cv.notify_all ();
2460
2460
}
2461
2461
2462
- std::string warningMessages ;
2462
+ bilingual_str warning_messages ;
2463
2463
if (!::ChainstateActive ().IsInitialBlockDownload ())
2464
2464
{
2465
2465
int nUpgraded = 0 ;
@@ -2468,11 +2468,11 @@ void static UpdateTip(const CBlockIndex* pindexNew, const CChainParams& chainPar
2468
2468
WarningBitsConditionChecker checker (bit);
2469
2469
ThresholdState state = checker.GetStateFor (pindex, chainParams.GetConsensus (), warningcache[bit]);
2470
2470
if (state == ThresholdState::ACTIVE || state == ThresholdState::LOCKED_IN) {
2471
- const std::string strWarning = strprintf (_ (" Warning: unknown new rules activated (versionbit %i)" ). translated , bit);
2471
+ const bilingual_str warning = strprintf (_ (" Warning: unknown new rules activated (versionbit %i)" ), bit);
2472
2472
if (state == ThresholdState::ACTIVE) {
2473
- DoWarning (strWarning );
2473
+ DoWarning (warning );
2474
2474
} else {
2475
- AppendWarning (warningMessages, strWarning );
2475
+ AppendWarning (warning_messages, warning );
2476
2476
}
2477
2477
}
2478
2478
}
@@ -2485,14 +2485,14 @@ void static UpdateTip(const CBlockIndex* pindexNew, const CChainParams& chainPar
2485
2485
pindex = pindex->pprev ;
2486
2486
}
2487
2487
if (nUpgraded > 0 )
2488
- AppendWarning (warningMessages , strprintf (_ (" %d of last 100 blocks have unexpected version" ). translated , nUpgraded));
2488
+ AppendWarning (warning_messages , strprintf (_ (" %d of last 100 blocks have unexpected version" ), nUpgraded));
2489
2489
}
2490
2490
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__,
2491
2491
pindexNew->GetBlockHash ().ToString (), pindexNew->nHeight , pindexNew->nVersion ,
2492
2492
log (pindexNew->nChainWork .getdouble ())/log (2.0 ), (unsigned long )pindexNew->nChainTx ,
2493
2493
FormatISO8601DateTime (pindexNew->GetBlockTime ()),
2494
2494
GuessVerificationProgress (chainParams.TxData (), pindexNew), ::ChainstateActive ().CoinsTip ().DynamicMemoryUsage () * (1.0 / (1 <<20 )), ::ChainstateActive ().CoinsTip ().GetCacheSize (),
2495
- !warningMessages .empty () ? strprintf (" warning='%s'" , warningMessages ) : " " );
2495
+ !warning_messages .empty () ? strprintf (" warning='%s'" , warning_messages. original ) : " " );
2496
2496
2497
2497
}
2498
2498
0 commit comments