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)
1230
1230
LogPrintf (" Prune: pruned datadir may not have more than %d blocks; -checkblocks=%d may fail\n " ,
1231
1231
MIN_BLOCKS_TO_KEEP, GetArg (" -checkblocks" , 288 ));
1232
1232
}
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
+
1233
1245
if (!CVerifyDB ().VerifyDB (pcoinsdbview, GetArg (" -checklevel" , 3 ),
1234
1246
GetArg (" -checkblocks" , 288 ))) {
1235
1247
strLoadError = _ (" Corrupted block database detected" );
You can’t perform that action at this time.
0 commit comments