Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Include dependency graph for pow.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
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 &) |
| Check whether a block hash satisfies the proof-of-work requirement specified by nBits. More... | |
Function Documentation
◆ CalculateNextWorkRequired()
| unsigned int CalculateNextWorkRequired | ( | const CBlockIndex * | pindexLast, |
| int64_t | nFirstBlockTime, | ||
| const Consensus::Params & | |||
| ) |
Definition at line 208 of file pow.cpp.
References Consensus::Params::fPowNoRetargeting, CBlockIndex::GetBlockTime(), arith_uint256::GetCompact(), CBlockIndex::nBits, Consensus::Params::nPowTargetTimespan, Consensus::Params::powLimit, arith_uint256::SetCompact(), and UintToArith256().
Referenced by GetNextWorkRequiredBTC().
◆ CheckProofOfWork()
| 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 233 of file pow.cpp.
References Consensus::Params::powLimit, arith_uint256::SetCompact(), and UintToArith256().
Referenced by CheckBlockHeader(), CBlockTreeDB::LoadBlockIndexGuts(), and ReadBlockFromDisk().
◆ GetNextWorkRequired()
| unsigned int GetNextWorkRequired | ( | const CBlockIndex * | pindexLast, |
| const CBlockHeader * | pblock, | ||
| const Consensus::Params & | |||
| ) |
Definition at line 168 of file pow.cpp.
References DarkGravityWave(), Consensus::Params::fPowAllowMinDifficultyBlocks, CBlockHeader::GetBlockTime(), CBlockIndex::GetBlockTime(), arith_uint256::GetCompact(), GetNextWorkRequiredBTC(), KimotoGravityWell(), CBlockIndex::nBits, CBlockIndex::nHeight, Consensus::Params::nMinimumDifficultyBlocks, Consensus::Params::nPowDGWHeight, Consensus::Params::nPowKGWHeight, Consensus::Params::nPowTargetSpacing, Consensus::Params::powLimit, arith_uint256::SetCompact(), and UintToArith256().
Referenced by ContextualCheckBlockHeader(), BlockAssembler::CreateNewBlock(), and UpdateTime().

