Anoncoin  0.9.4
P2P Digital Currency
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 // Copyright (c) 2013-2014 The Anoncoin Core developers
4 // Distributed under the MIT/X11 software license, see the accompanying
5 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 
7 #ifndef ANONCOIN_MINER_H
8 #define ANONCOIN_MINER_H
9 
10 #include <stdint.h>
11 
12 class CBlock;
13 class CBlockIndex;
14 struct CBlockTemplate;
15 class CReserveKey;
16 class CScript;
17 class CWallet;
18 
20 void GenerateAnoncoins(bool fGenerate, CWallet* pwallet, int nThreads);
22 CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn);
25 void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce);
27 void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash1);
29 bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey);
31 void SHA256Transform(void* pstate, void* pinput, const void* pinit);
32 
33 extern double dHashesPerSec;
34 extern int64_t nHPSTimerStart;
35 
36 #endif // ANONCOIN_MINER_H
CBlockTemplate * CreateNewBlockWithKey(CReserveKey &reservekey)
double dHashesPerSec
Definition: core.h:394
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:371
CBlockTemplate * CreateNewBlock(const CScript &scriptPubKeyIn)
Generate a new block, without valid proof-of-work.
Definition: miner.cpp:113
A key allocated from the key pool.
Definition: wallet.h:415
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: main.h:698
void IncrementExtraNonce(CBlock *pblock, CBlockIndex *pindexPrev, unsigned int &nExtraNonce)
Modify the extranonce in a block.
Definition: miner.cpp:353
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:413
int64_t nHPSTimerStart
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
Definition: wallet.h:101
void GenerateAnoncoins(bool fGenerate, CWallet *pwallet, int nThreads)
Run the miner threads.
void SHA256Transform(void *pstate, void *pinput, const void *pinit)
Base sha256 mining transform.
Definition: miner.cpp:43