| 59 | } |
| 60 | |
| 61 | unsigned int LwmaGetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock, const Consensus::Params& params) |
| 62 | { |
| 63 | // Special difficulty rule for testnet: |
| 64 | // If the new block's timestamp is more than 2 * 10 minutes |
| 65 | // then allow mining of a min-difficulty block. |
| 66 | if (params.fPowAllowMinDifficultyBlocks && |
| 67 | pblock->GetBlockTime() > pindexLast->GetBlockTime() + params.nPowTargetSpacing * 2) { |
| 68 | return UintToArith256(params.PowLimit(true)).GetCompact(); |
| 69 | } |
| 70 | return LwmaCalculateNextWorkRequired(pindexLast, params); |
| 71 | } |
| 72 | |
| 73 | unsigned int LwmaCalculateNextWorkRequired(const CBlockIndex* pindexLast, const Consensus::Params& params) |
| 74 | { |
no test coverage detected