File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1230,6 +1230,18 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
12301230 LogPrintf (" Prune: pruned datadir may not have more than %d blocks; -checkblocks=%d may fail\n " ,
12311231 MIN_BLOCKS_TO_KEEP, GetArg (" -checkblocks" , 288 ));
12321232 }
1233+
1234+ {
1235+ LOCK (cs_main);
1236+ CBlockIndex* tip = chainActive.Tip ();
1237+ if (tip && tip->nTime > GetAdjustedTime () + 2 * 60 * 60 ) {
1238+ strLoadError = _ (" The block database contains a block which appears to be from the future. "
1239+ " This may be due to your computer's date and time being set incorrectly. "
1240+ " Only rebuild the block database if you are sure that your computer's date and time are correct" );
1241+ break ;
1242+ }
1243+ }
1244+
12331245 if (!CVerifyDB ().VerifyDB (pcoinsdbview, GetArg (" -checklevel" , 3 ),
12341246 GetArg (" -checkblocks" , 288 ))) {
12351247 strLoadError = _ (" Corrupted block database detected" );
You can’t perform that action at this time.
0 commit comments