1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2014 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
9 #include "consensus/params.h"
18 unsigned int GetNextWorkRequired(const CBlockIndex
* pindexLast
, const CBlockHeader
*pblock
, const Consensus::Params
&);
19 unsigned int CalculateNextWorkRequired(const CBlockIndex
* pindexLast
, int64_t nFirstBlockTime
, const Consensus::Params
&);
21 /** Check whether a block hash satisfies the proof-of-work requirement specified by nBits */
22 bool CheckProofOfWork(uint256 hash
, unsigned int nBits
, const Consensus::Params
&);
23 arith_uint256
GetBlockProof(const CBlockIndex
& block
);
25 /** 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. */
26 int64_t GetBlockProofEquivalentTime(const CBlockIndex
& to
, const CBlockIndex
& from
, const CBlockIndex
& tip
, const Consensus::Params
&);
28 #endif // BITCOIN_POW_H