Browse Source

timedata: Prevent warning overkill

The "please check your computer's data and time" message when the clock
deviates from the network currently generates an overkill of messages:

    orion@lethe:~/bitcoin$ src/bitcoind
    Warning: Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.

In the log:

    2015-09-27 16:24:13 *** Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.
    2015-09-27 16:24:13 Warning: Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.

Remove one level of 'Warning:' and reduce to one log message.
0.13
Wladimir J. van der Laan 9 years ago
parent
commit
9fea833a12
  1. 3
      src/timedata.cpp

3
src/timedata.cpp

@ -99,9 +99,8 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample) @@ -99,9 +99,8 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample)
if (!fMatch)
{
fDone = true;
string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.");
string strMessage = _("Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.");
strMiscWarning = strMessage;
LogPrintf("*** %s\n", strMessage);
uiInterface.ThreadSafeMessageBox(strMessage, "", CClientUIInterface::MSG_WARNING);
}
}

Loading…
Cancel
Save