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