]>
Commit | Line | Data |
---|---|---|
d247a5d1 | 1 | // Copyright (c) 2009-2010 Satoshi Nakamoto |
f914f1a7 | 2 | // Copyright (c) 2009-2013 The Bitcoin Core developers |
78253fcb | 3 | // Distributed under the MIT software license, see the accompanying |
d247a5d1 | 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. |
51ed9ec9 | 5 | |
d247a5d1 JG |
6 | #ifndef BITCOIN_MINER_H |
7 | #define BITCOIN_MINER_H | |
8 | ||
2ce63d39 LD |
9 | #include "primitives/block.h" |
10 | ||
51ed9ec9 BD |
11 | #include <stdint.h> |
12 | ||
51ed9ec9 | 13 | class CBlockIndex; |
51ed9ec9 BD |
14 | class CReserveKey; |
15 | class CScript; | |
16 | class CWallet; | |
30c43d98 | 17 | namespace Consensus { struct Params; }; |
d247a5d1 | 18 | |
2ce63d39 LD |
19 | struct CBlockTemplate |
20 | { | |
21 | CBlock block; | |
22 | std::vector<CAmount> vTxFees; | |
23 | std::vector<int64_t> vTxSigOps; | |
24 | }; | |
ac14bcc1 | 25 | |
d247a5d1 | 26 | /** Run the miner threads */ |
c8b74258 | 27 | void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads); |
d247a5d1 | 28 | /** Generate a new block, without valid proof-of-work */ |
48265f3c WL |
29 | CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn); |
30 | CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey); | |
d247a5d1 JG |
31 | /** Modify the extranonce in a block */ |
32 | void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce); | |
bebe7282 | 33 | void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams, const CBlockIndex* pindexPrev); |
d247a5d1 JG |
34 | |
35 | #endif // BITCOIN_MINER_H |