Master Core  v0.0.9 - 49a5c0d97abf09ef2911ddfe8d9551df59f9efd3-dirty
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
miner.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2013 The Bitcoin developers
3 // Distributed under the MIT/X11 software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_MINER_H
7 #define BITCOIN_MINER_H
8 
9 #include <stdint.h>
10 
11 class CBlock;
12 class CBlockIndex;
13 struct CBlockTemplate;
14 class CReserveKey;
15 class CScript;
16 class CWallet;
17 
19 void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads);
21 CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn);
24 void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce);
26 void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash1);
28 bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey);
30 void SHA256Transform(void* pstate, void* pinput, const void* pinit);
31 
32 extern double dHashesPerSec;
33 extern int64_t nHPSTimerStart;
34 
35 #endif // BITCOIN_MINER_H
CBlockTemplate * CreateNewBlockWithKey(CReserveKey &reservekey)
double dHashesPerSec
Definition: core.h:396
void GenerateBitcoins(bool fGenerate, CWallet *pwallet, int nThreads)
Run the miner threads.
bool CheckWork(CBlock *pblock, CWallet &wallet, CReserveKey &reservekey)
Check mined block.
void FormatHashBuffers(CBlock *pblock, char *pmidstate, char *pdata, char *phash1)
Do mining precalculation.
Definition: miner.cpp:365
CBlockTemplate * CreateNewBlock(const CScript &scriptPubKeyIn)
Generate a new block, without valid proof-of-work.
Definition: miner.cpp:107
A key allocated from the key pool.
Definition: wallet.h:402
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: main.h:688
void IncrementExtraNonce(CBlock *pblock, CBlockIndex *pindexPrev, unsigned int &nExtraNonce)
Modify the extranonce in a block.
Definition: miner.cpp:347
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:401
int64_t nHPSTimerStart
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
Definition: wallet.h:100
void SHA256Transform(void *pstate, void *pinput, const void *pinit)
Base sha256 mining transform.
Definition: miner.cpp:37