diff options
author | Jeff Garzik <jgarzik@bitpay.com> | 2013-07-31 09:43:35 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@bitpay.com> | 2013-07-31 09:43:35 -0400 |
commit | d247a5d130544622519ad84dc8a1e50336397c51 (patch) | |
tree | 81064dc545e650cd3c50866c50d9440e57e2b907 /src/main.h | |
parent | 18946846d5c321d2afc11445580874c9a8bb0733 (diff) |
Move internal miner/block creation to separate miner.cpp module.
Public functions referenced elsewhere are added to miner.h.
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/main.h b/src/main.h index a42f7968fd..cb0ee1aaa8 100644 --- a/src/main.h +++ b/src/main.h @@ -159,16 +159,6 @@ bool ProcessMessages(CNode* pfrom); bool SendMessages(CNode* pto, bool fSendTrickle); /** Run an instance of the script checking thread */ void ThreadScriptCheck(); -/** Run the miner threads */ -void GenerateBitcoins(bool fGenerate, CWallet* pwallet); -/** Generate a new block, without valid proof-of-work */ -CBlockTemplate* CreateNewBlock(CReserveKey& reservekey); -/** Modify the extranonce in a block */ -void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce); -/** Do mining precalculation */ -void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash1); -/** Check mined block */ -bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey); /** Check whether a block hash satisfies the proof-of-work requirement specified by nBits */ bool CheckProofOfWork(uint256 hash, unsigned int nBits); /** Calculate the minimum amount of work a received block needs, without knowing its direct parent */ @@ -185,6 +175,8 @@ bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock, b bool SetBestChain(CValidationState &state, CBlockIndex* pindexNew); /** Find the best known block, and make it the tip of the block chain */ bool ConnectBestBlock(CValidationState &state); +int64 GetBlockValue(int nHeight, int64 nFees); +unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock); void UpdateTime(CBlockHeader& block, const CBlockIndex* pindexPrev); |