Use equivalent PoW for non-main-chain requests

This commit is contained in:
Pieter Wuille
2015-03-17 06:35:59 -07:00
parent b6ea3bcede
commit f7303f9793
4 changed files with 49 additions and 4 deletions

View File

@@ -22,4 +22,7 @@ unsigned int CalculateNextWorkRequired(const CBlockIndex* pindexLast, int64_t nF
bool CheckProofOfWork(uint256 hash, unsigned int nBits, const Consensus::Params&);
arith_uint256 GetBlockProof(const CBlockIndex& block);
/** Return the time it would take to redo the work difference between from and to, assuming the current hashrate corresponds to the difficulty at tip, in seconds. */
int64_t GetBlockProofEquivalentTime(const CBlockIndex& to, const CBlockIndex& from, const CBlockIndex& tip, const Consensus::Params&);
#endif // BITCOIN_POW_H