Consensus: Decouple pow.cpp from util.h
This commit is contained in:
@@ -90,11 +90,11 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits, const Consensus::Params&
|
||||
|
||||
// Check range
|
||||
if (fNegative || bnTarget == 0 || fOverflow || bnTarget > UintToArith256(params.powLimit))
|
||||
return error("CheckProofOfWork(): nBits below minimum work");
|
||||
return false;
|
||||
|
||||
// Check proof of work matches claimed amount
|
||||
if (UintToArith256(hash) > bnTarget)
|
||||
return error("CheckProofOfWork(): hash doesn't match nBits");
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user