| 207 | } |
| 208 | |
| 209 | unsigned int ReduceDifficultyBy(const CBlockIndex* pindexLast, int64_t multiplier, const Consensus::Params& params) { |
| 210 | arith_uint256 target; |
| 211 | target.SetCompact(pindexLast->nBits); |
| 212 | target *= multiplier; |
| 213 | const arith_uint256 pow_limit = UintToArith256(params.PowLimit(true)); |
| 214 | if (target > pow_limit) { |
| 215 | target = pow_limit; |
| 216 | } |
| 217 | return target.GetCompact(); |
| 218 | } |
| 219 | |
| 220 | unsigned int BitcoinCalculateNextWorkRequired(const CBlockIndex* pindexLast, int64_t nFirstBlockTime, const Consensus::Params& params) |
| 221 | { |