![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
Go to the source code of this file.
Enumerations | |
enum | DiffMode { DIFF_DEFAULT = 0, DIFF_BTC = 1, DIFF_KGW = 2, DIFF_DGW = 3 } |
Functions | |
unsigned int | GetNextWorkRequired (const CBlockIndex *pindexLast, const CBlockHeader *pblock, const Consensus::Params &) |
unsigned int | CalculateNextWorkRequired (const CBlockIndex *pindexLast, int64_t nFirstBlockTime, const Consensus::Params &) |
bool | CheckProofOfWork (uint256 hash, unsigned int nBits, const Consensus::Params &) |
arith_uint256 | GetBlockProof (const CBlockIndex &block) |
int64_t | GetBlockProofEquivalentTime (const CBlockIndex &to, const CBlockIndex &from, const CBlockIndex &tip, const Consensus::Params &) |
enum DiffMode |
unsigned int CalculateNextWorkRequired | ( | const CBlockIndex * | pindexLast, |
int64_t | nFirstBlockTime, | ||
const Consensus::Params & | |||
) |
bool CheckProofOfWork | ( | uint256 | hash, |
unsigned int | nBits, | ||
const Consensus::Params & | |||
) |
Check whether a block hash satisfies the proof-of-work requirement specified by nBits
Definition at line 238 of file pow.cpp.
Referenced by CheckBlockHeader(), generate(), CBlockTreeDB::LoadBlockIndexGuts(), and ReadBlockFromDisk().
arith_uint256 GetBlockProof | ( | const CBlockIndex & | block | ) |
Definition at line 257 of file pow.cpp.
Referenced by AddToBlockIndex(), CheckForkWarningConditions(), CheckForkWarningConditionsOnNewFork(), GetBlockProofEquivalentTime(), and LoadBlockIndexDB().
int64_t GetBlockProofEquivalentTime | ( | const CBlockIndex & | to, |
const CBlockIndex & | from, | ||
const CBlockIndex & | tip, | ||
const Consensus::Params & | |||
) |
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.
Definition at line 272 of file pow.cpp.
Referenced by ConnectBlock(), and ProcessGetData().
unsigned int GetNextWorkRequired | ( | const CBlockIndex * | pindexLast, |
const CBlockHeader * | pblock, | ||
const Consensus::Params & | |||
) |
Definition at line 172 of file pow.cpp.
Referenced by ContextualCheckBlockHeader(), CreateNewBlock(), and UpdateTime().