Add parentChainPowLimit, check in CheckBitcoinProof

This commit is contained in:
instagibbs 2016-06-09 13:23:11 -04:00 committed by Gregory Sanders
parent 8c8565c9e5
commit 85be0821fa
3 changed files with 9 additions and 1 deletions

View file

@ -48,7 +48,7 @@ bool CheckBitcoinProof(const CBlockHeader& block)
bnTarget.SetCompact(block.bitcoinproof.challenge, &fNegative, &fOverflow);
// Check range
if (fNegative || bnTarget == 0 || fOverflow || bnTarget > UintToArith256(Params().GetConsensus().powLimit))
if (fNegative || bnTarget == 0 || fOverflow || bnTarget > UintToArith256(Params().GetConsensus().parentChainPowLimit))
return false;
// Check proof of work matches claimed amount