diff --git a/src/init.cpp b/src/init.cpp index a03147089..9ab3b675f 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -641,6 +641,8 @@ static void ZC_LoadParams() /** Initialize bitcoin. * @pre Parameters should be parsed and config file should be read. */ +extern int32_t KOMODO_REWIND; + bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) { // ********************************************************* Step 1: setup @@ -1244,10 +1246,13 @@ 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)); } - if (!CVerifyDB().VerifyDB(pcoinsdbview, GetArg("-checklevel", 3), - GetArg("-checkblocks", 288))) { - strLoadError = _("Corrupted block database detected"); - break; + if ( KOMODO_REWIND == 0 ) + { + if (!CVerifyDB().VerifyDB(pcoinsdbview, GetArg("-checklevel", 3), + GetArg("-checkblocks", 288))) { + strLoadError = _("Corrupted block database detected"); + break; + } } } catch (const std::exception& e) { if (fDebug) LogPrintf("%s\n", e.what()); @@ -1456,7 +1461,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) if (mapArgs.count("-blocknotify")) uiInterface.NotifyBlockTip.connect(BlockNotifyCallback); - extern int32_t KOMODO_REWIND; if ( KOMODO_REWIND < 0 ) KOMODO_REWIND = 0; else