]> Git Repo - VerusCoin.git/blobdiff - src/miner.h
Auto merge of #2704 - bitcartel:fix_qa_shieldcoinbase_hang, r=str4d
[VerusCoin.git] / src / miner.h
index 549658ec171a2ecb2e66f7050fc0cdc9b8ecaa47..bf1a088f0d3f8d8eb8db35ea610f180648ba7dd9 100644 (file)
@@ -8,12 +8,16 @@
 
 #include "primitives/block.h"
 
+#include <boost/optional.hpp>
 #include <stdint.h>
 
 class CBlockIndex;
-class CReserveKey;
 class CScript;
+#ifdef ENABLE_WALLET
+class CReserveKey;
 class CWallet;
+#endif
+namespace Consensus { struct Params; };
 
 struct CBlockTemplate
 {
@@ -22,15 +26,27 @@ struct CBlockTemplate
     std::vector<int64_t> vTxSigOps;
 };
 
-/** Run the miner threads */
-void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads);
-/** Create a single block */
-bool MineBlock(CWallet *pwallet, uint256& hash);
 /** Generate a new block, without valid proof-of-work */
 CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn);
+#ifdef ENABLE_WALLET
+boost::optional<CScript> GetMinerScriptPubKey(CReserveKey& reservekey);
 CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey);
+#else
+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);
-void UpdateTime(CBlockHeader* block, const CBlockIndex* pindexPrev);
+/** 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
This page took 0.021421 seconds and 4 git commands to generate.