Skip to content

Commit

Permalink
Fix litemode vs txindex check (dashpay#3355)
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 committed Mar 12, 2020
1 parent c9881d0 commit 05c134c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1760,11 +1760,6 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
InitWarning(_("You are starting in lite mode, most Dash-specific functionality is disabled."));
}

if((!fLiteMode && fTxIndex == false)
&& chainparams.NetworkIDString() != CBaseChainParams::REGTEST) { // TODO remove this when pruning is fixed. See https://github.com/dashpay/dash/pull/1817 and https://github.com/dashpay/dash/pull/1743
return InitError(_("Transaction index can't be disabled in full mode. Either start with -litemode command line switch or enable transaction index."));
}

if (!fLiteMode) {
uiInterface.InitMessage(_("Loading sporks cache..."));
CFlatDB<CSporkManager> flatdb6("sporks.dat", "magicSporkCache");
Expand Down Expand Up @@ -1838,6 +1833,11 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
break;
}

if (!fLiteMode && !fTxIndex
&& chainparams.NetworkIDString() != CBaseChainParams::REGTEST) { // TODO remove this when pruning is fixed. See https://github.com/dashpay/dash/pull/1817 and https://github.com/dashpay/dash/pull/1743
return InitError(_("Transaction index can't be disabled in full mode. Either start with -litemode command line switch or enable transaction index."));
}

// If the loaded chain has a wrong genesis, bail out immediately
// (we're likely using a testnet datadir, or the other way around).
if (!mapBlockIndex.empty() && mapBlockIndex.count(chainparams.GetConsensus().hashGenesisBlock) == 0)
Expand Down

0 comments on commit 05c134c

Please sign in to comment.