Merge pull request #3368 from laanwj/2013_11_disable_wallet_mining

Allow mining RPCs with --disable-wallet
This commit is contained in:
Gavin Andresen 2013-12-09 19:36:39 -08:00
commit d47bbbd261
8 changed files with 104 additions and 82 deletions

View file

@ -113,8 +113,8 @@ void Shutdown()
RenameThread("bitcoin-shutoff");
mempool.AddTransactionsUpdated(1);
StopRPCThreads();
#ifdef ENABLE_WALLET
ShutdownRPCMining();
#ifdef ENABLE_WALLET
if (pwalletMain)
bitdb.Flush(false);
GenerateBitcoins(false, NULL, 0);
@ -1042,10 +1042,8 @@ bool AppInit2(boost::thread_group& threadGroup, bool fForceServer)
#endif
StartNode(threadGroup);
#ifdef ENABLE_WALLET
// InitRPCMining is needed here so getwork/getblocktemplate in the GUI debug console works properly.
InitRPCMining();
#endif
if (fServer)
StartRPCThreads();