Correct #ifdef nesting of miner headers and helper functions

This commit is contained in:
Jack Grigg
2017-01-29 13:51:30 +01:00
parent 78ba3472d2
commit c1de826f10
2 changed files with 35 additions and 32 deletions

View File

@@ -26,14 +26,6 @@ struct CBlockTemplate
std::vector<int64_t> vTxSigOps;
};
#ifdef ENABLE_MINING
/** Run the miner threads */
#ifdef ENABLE_WALLET
void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads);
#else
void GenerateBitcoins(bool fGenerate, int nThreads);
#endif
#endif
/** Generate a new block, without valid proof-of-work */
CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn);
#ifdef ENABLE_WALLET
@@ -43,8 +35,18 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey);
boost::optional<CScript> GetMinerScriptPubKey();
CBlockTemplate* CreateNewBlockWithKey();
#endif
#ifdef ENABLE_MINING
/** Modify the extranonce in a block */
void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce);
/** Run the miner threads */
#ifdef ENABLE_WALLET
void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads);
#else
void GenerateBitcoins(bool fGenerate, int nThreads);
#endif
#endif
void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev);
#endif // BITCOIN_MINER_H