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

@@ -4,7 +4,9 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "miner.h"
#if defined(ENABLE_WALLET) && defined(ENABLE_MINING)
#include "pow/tromp/equi_miner.h"
#endif
#include "amount.h"
#include "chainparams.h"
@@ -21,7 +23,9 @@
#include "util.h"
#include "utilmoneystr.h"
#ifdef ENABLE_WALLET
#ifdef ENABLE_MINING
#include "crypto/equihash.h"
#endif
#include "wallet/wallet.h"
#include <functional>
#endif
@@ -414,6 +418,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey)
return CreateNewBlock(scriptPubKey);
}
#ifdef ENABLE_MINING
static bool ProcessBlockFound(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey)
{
LogPrintf("%s\n", pblock->ToString());
@@ -687,4 +692,5 @@ void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads)
minerThreads->create_thread(boost::bind(&BitcoinMiner, pwallet));
}
#endif // ENABLE_MINING
#endif // ENABLE_WALLET