Add compile flag to disable compilation of mining code

This commit is contained in:
Jack Grigg
2016-11-06 13:40:34 -06:00
parent ee6d993561
commit 2cc0a252ad
15 changed files with 107 additions and 14 deletions

View File

@@ -163,7 +163,9 @@ void Shutdown()
#ifdef ENABLE_WALLET
if (pwalletMain)
pwalletMain->Flush(false);
#ifdef ENABLE_MINING
GenerateBitcoins(false, NULL, 0);
#endif
#endif
StopNode();
UnregisterNodeSignals(GetNodeSignals());
@@ -1500,7 +1502,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
boost::ref(cs_main), boost::cref(pindexBestHeader), nPowTargetSpacing);
scheduler.scheduleEvery(f, nPowTargetSpacing);
#ifdef ENABLE_WALLET
#if defined(ENABLE_WALLET) && defined(ENABLE_MINING)
// Generate coins in the background
if (pwalletMain)
GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 1));