Browse Source

Merge pull request #6489

f261f19 Give a better error message if system clock is bad (Casey Rodarmor)
0.13
Wladimir J. van der Laan 10 years ago
parent
commit
c9c017adf6
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 12
      src/init.cpp

12
src/init.cpp

@ -1230,6 +1230,18 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) @@ -1230,6 +1230,18 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
LogPrintf("Prune: pruned datadir may not have more than %d blocks; -checkblocks=%d may fail\n",
MIN_BLOCKS_TO_KEEP, GetArg("-checkblocks", 288));
}
{
LOCK(cs_main);
CBlockIndex* tip = chainActive.Tip();
if (tip && tip->nTime > GetAdjustedTime() + 2 * 60 * 60) {
strLoadError = _("The block database contains a block which appears to be from the future. "
"This may be due to your computer's date and time being set incorrectly. "
"Only rebuild the block database if you are sure that your computer's date and time are correct");
break;
}
}
if (!CVerifyDB().VerifyDB(pcoinsdbview, GetArg("-checklevel", 3),
GetArg("-checkblocks", 288))) {
strLoadError = _("Corrupted block database detected");

Loading…
Cancel
Save