| 159 | } |
| 160 | |
| 161 | bool CheckProofOfWorkImpl(uint256 hash, unsigned int nBits, const Consensus::Params& params) |
| 162 | { |
| 163 | auto bnTarget{DeriveTarget(nBits, params.powLimit)}; |
| 164 | if (!bnTarget) return false; |
| 165 | |
| 166 | // Check proof of work matches claimed amount |
| 167 | if (UintToArith256(hash) > bnTarget) |
| 168 | return false; |
| 169 | |
| 170 | return true; |
| 171 | } |
no test coverage detected