]>
Commit | Line | Data |
---|---|---|
d247a5d1 | 1 | // Copyright (c) 2009-2010 Satoshi Nakamoto |
db0e8ccd | 2 | // Copyright (c) 2009-2013 The Bitcoin developers |
d247a5d1 JG |
3 | // Distributed under the MIT/X11 software license, see the accompanying |
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 | ||
51ed9ec9 BD |
9 | #include <stdint.h> |
10 | ||
11 | class CBlock; | |
12 | class CBlockIndex; | |
51ed9ec9 BD |
13 | class CReserveKey; |
14 | class CScript; | |
15 | class CWallet; | |
d247a5d1 | 16 | |
ac14bcc1 PK |
17 | struct CBlockTemplate; |
18 | ||
d247a5d1 | 19 | /** Run the miner threads */ |
c8b74258 | 20 | void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads); |
d247a5d1 | 21 | /** Generate a new block, without valid proof-of-work */ |
f1dbed92 | 22 | CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn); |
7e170189 | 23 | CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey); |
d247a5d1 JG |
24 | /** Modify the extranonce in a block */ |
25 | void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce); | |
d247a5d1 JG |
26 | /** Check mined block */ |
27 | bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey); | |
d247a5d1 | 28 | |
8d750f1d | 29 | extern double dHashesPerSec; |
51ed9ec9 | 30 | extern int64_t nHPSTimerStart; |
8d750f1d | 31 | |
d247a5d1 | 32 | #endif // BITCOIN_MINER_H |