Fix getbalance() bug
[novacoin.git] / src / miner.h
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2012 The Bitcoin developers
3 // Copyright (c) 2013 The NovaCoin 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 #ifndef NOVACOIN_MINER_H
7 #define NOVACOIN_MINER_H
8
9 #include "main.h"
10 #include "wallet.h"
11
12 /* Generate a new block, without valid proof-of-work/with provided proof-of-stake */
13 CBlock* CreateNewBlock(CWallet* pwallet, CTransaction *txAdd=NULL);
14
15 /** Modify the extranonce in a block */
16 void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce);
17
18 /** Do mining precalculation */
19 void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash1);
20
21 /** Check mined proof-of-work block */
22 bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey);
23
24 /** Check mined proof-of-stake block */
25 bool CheckStake(CBlock* pblock, CWallet& wallet);
26
27 /** Base sha256 mining transform */
28 void SHA256Transform(void* pstate, void* pinput, const void* pinit);
29
30 /** Stake miner thread */
31 void ThreadStakeMiner(void* parg);
32
33 #endif // NOVACOIN_MINER_H