1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2013 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 #ifndef BITCOIN_MINER_H
7 #define BITCOIN_MINER_H
9 #include "primitives/block.h"
17 namespace Consensus { struct Params; };
22 std::vector<CAmount> vTxFees;
23 std::vector<int64_t> vTxSigOps;
26 /** Run the miner threads */
27 void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads);
28 /** Generate a new block, without valid proof-of-work */
29 CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn);
30 CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey);
31 /** Modify the extranonce in a block */
32 void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce);
33 void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev);
35 #endif // BITCOIN_MINER_H