@@ -1655,21 +1655,20 @@ bool UndoReadFromDisk(CBlockUndo& blockundo, const CBlockIndex* pindex)
1655
1655
}
1656
1656
1657
1657
/* * Abort with a message */
1658
- // TODO: AbortNode() should take bilingual_str userMessage parameter.
1659
- static bool AbortNode (const std::string& strMessage, const std::string& userMessage = " " , unsigned int prefix = 0 )
1658
+ static bool AbortNode (const std::string& strMessage, const bilingual_str& userMessage = bilingual_str(), unsigned int prefix = 0)
1660
1659
{
1661
1660
SetMiscWarning (strMessage);
1662
1661
LogPrintf (" *** %s\n " , strMessage);
1663
1662
if (!userMessage.empty ()) {
1664
- uiInterface.ThreadSafeMessageBox (Untranslated ( userMessage) , " " , CClientUIInterface::MSG_ERROR | prefix);
1663
+ uiInterface.ThreadSafeMessageBox (userMessage, " " , CClientUIInterface::MSG_ERROR | prefix);
1665
1664
} else {
1666
1665
uiInterface.ThreadSafeMessageBox (_ (" Error: A fatal internal error occurred, see debug.log for details" ), " " , CClientUIInterface::MSG_ERROR | CClientUIInterface::MSG_NOPREFIX);
1667
1666
}
1668
1667
StartShutdown ();
1669
1668
return false ;
1670
1669
}
1671
1670
1672
- static bool AbortNode (BlockValidationState& state, const std::string& strMessage, const std::string & userMessage = " " , unsigned int prefix = 0 )
1671
+ static bool AbortNode (BlockValidationState& state, const std::string& strMessage, const bilingual_str & userMessage = bilingual_str() , unsigned int prefix = 0)
1673
1672
{
1674
1673
AbortNode (strMessage, userMessage, prefix);
1675
1674
return state.Error (strMessage);
@@ -2336,7 +2335,7 @@ bool CChainState::FlushStateToDisk(
2336
2335
if (fDoFullFlush || fPeriodicWrite ) {
2337
2336
// Depend on nMinDiskSpace to ensure we can write block index
2338
2337
if (!CheckDiskSpace (GetBlocksDir ())) {
2339
- return AbortNode (state, " Disk space is too low!" , _ (" Error: Disk space is too low!" ). translated , CClientUIInterface::MSG_NOPREFIX);
2338
+ return AbortNode (state, " Disk space is too low!" , _ (" Error: Disk space is too low!" ), CClientUIInterface::MSG_NOPREFIX);
2340
2339
}
2341
2340
{
2342
2341
LOG_TIME_MILLIS_WITH_CATEGORY (" write block and undo data to disk" , BCLog::BENCH);
@@ -2384,7 +2383,7 @@ bool CChainState::FlushStateToDisk(
2384
2383
// an overestimation, as most will delete an existing entry or
2385
2384
// overwrite one. Still, use a conservative safety factor of 2.
2386
2385
if (!CheckDiskSpace (GetDataDir (), 48 * 2 * 2 * CoinsTip ().GetCacheSize ())) {
2387
- return AbortNode (state, " Disk space is too low!" , _ (" Error: Disk space is too low!" ). translated , CClientUIInterface::MSG_NOPREFIX);
2386
+ return AbortNode (state, " Disk space is too low!" , _ (" Error: Disk space is too low!" ), CClientUIInterface::MSG_NOPREFIX);
2388
2387
}
2389
2388
// Flush the chainstate (which may refer to block index entries).
2390
2389
if (!CoinsTip ().Flush ())
@@ -3291,7 +3290,7 @@ static bool FindBlockPos(FlatFilePos &pos, unsigned int nAddSize, unsigned int n
3291
3290
bool out_of_space;
3292
3291
size_t bytes_allocated = BlockFileSeq ().Allocate (pos, nAddSize, out_of_space);
3293
3292
if (out_of_space) {
3294
- return AbortNode (" Disk space is too low!" , _ (" Error: Disk space is too low!" ). translated , CClientUIInterface::MSG_NOPREFIX);
3293
+ return AbortNode (" Disk space is too low!" , _ (" Error: Disk space is too low!" ), CClientUIInterface::MSG_NOPREFIX);
3295
3294
}
3296
3295
if (bytes_allocated != 0 && fPruneMode ) {
3297
3296
fCheckForPruning = true ;
@@ -3315,7 +3314,7 @@ static bool FindUndoPos(BlockValidationState &state, int nFile, FlatFilePos &pos
3315
3314
bool out_of_space;
3316
3315
size_t bytes_allocated = UndoFileSeq ().Allocate (pos, nAddSize, out_of_space);
3317
3316
if (out_of_space) {
3318
- return AbortNode (state, " Disk space is too low!" , _ (" Error: Disk space is too low!" ). translated , CClientUIInterface::MSG_NOPREFIX);
3317
+ return AbortNode (state, " Disk space is too low!" , _ (" Error: Disk space is too low!" ), CClientUIInterface::MSG_NOPREFIX);
3319
3318
}
3320
3319
if (bytes_allocated != 0 && fPruneMode ) {
3321
3320
fCheckForPruning = true ;
0 commit comments