std::string strTrustedUpstream = "localhost";
// Current offset
-int64_t nNtpOffset = INT64_MAX;
+int64_t nNtpOffset = numeric_limits<int64_t>::max();
int64_t GetNtpOffset() {
return nNtpOffset;
}
else {
// Something went wrong, disable trusted offset sampling.
- nNtpOffset = INT64_MAX;
+ nNtpOffset = numeric_limits<int64_t>::max();
strTrustedUpstream = "localhost";
int nSleepMinutes = 1 + GetRandInt(9); // Sleep for 1-10 minutes.
}
else {
// Not enough offsets yet, try to collect additional samples later.
- nNtpOffset = INT64_MAX;
+ nNtpOffset = numeric_limits<int64_t>::max();
int nSleepMinutes = 1 + GetRandInt(4); // Sleep for 1-5 minutes.
for (int i = 0; i < nSleepMinutes * 60 && !fShutdown; i++)
Sleep(1000);
}
}
- if (GetNodesOffset() == INT_MAX && abs(nNtpOffset) > 40 * 60)
+ if (GetNodesOffset() == numeric_limits<int64_t>::max() && abs(nNtpOffset) > 40 * 60)
{
// If there is not enough node offsets data and NTP time offset is greater than 40 minutes then give a warning.
std::string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong NovaCoin will not work properly.");