diff options
author | jtimon <jtimon@monetize.io> | 2014-03-10 08:46:53 -0700 |
---|---|---|
committer | jtimon <jtimon@monetize.io> | 2014-06-23 23:10:24 +0200 |
commit | df852d2bcc6573a3fcb3e59f82f7ea4dfa11290e (patch) | |
tree | f8651a97cf4617ce0a867f964f5c70b0f2bf8090 /src/main.h | |
parent | 36db6633c314b0f41aeee856f74a8d5d59334dbb (diff) |
Refactor proof of work related functions out of main
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/main.h b/src/main.h index 27041a0026..9858bcfd69 100644 --- a/src/main.h +++ b/src/main.h @@ -146,10 +146,6 @@ bool ProcessMessages(CNode* pfrom); bool SendMessages(CNode* pto, bool fSendTrickle); /** Run an instance of the script checking thread */ void ThreadScriptCheck(); -/** 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 */ -unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime); /** Check whether we are doing an initial block download (synchronizing from disk or network) */ bool IsInitialBlockDownload(); /** Format a string that describes several potential problems detected by the core */ @@ -159,7 +155,6 @@ bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock, b /** Find the best known block, and make it the tip of the block chain */ bool ActivateBestChain(CValidationState &state); int64_t GetBlockValue(int nHeight, int64_t nFees); -unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock); void UpdateTime(CBlockHeader& block, const CBlockIndex* pindexPrev); @@ -812,11 +807,6 @@ public: return (~bnTarget / (bnTarget + 1)) + 1; } - bool CheckIndex() const - { - return CheckProofOfWork(GetBlockHash(), nBits); - } - enum { nMedianTimeSpan=11 }; int64_t GetMedianTimePast() const |