This commit is contained in:
Michael Toutonghi
2018-05-17 22:58:30 -07:00
parent 31bbe2343f
commit f6608b5a0d
5 changed files with 17 additions and 10 deletions

View File

@@ -323,7 +323,7 @@ bool CheckProofOfWork(const CBlockHeader &blkHeader, uint8_t *pubkey33, int32_t
return error("CheckProofOfWork(): nBits below minimum work");
// Check proof of work matches claimed amount
if ( UintToArith256(hash = blkHeader.GetHash()) > bnTarget && !blkHeader.isVerusPOSBlock() )
if ( UintToArith256(hash = blkHeader.GetHash()) > bnTarget && !blkHeader.IsVerusPOSBlock() )
{
if ( KOMODO_LOADINGBLOCKS != 0 )
return true;
@@ -357,7 +357,6 @@ bool CheckProofOfWork(const CBlockHeader &blkHeader, uint8_t *pubkey33, int32_t
return true;
}
arith_uint256 GetBlockProof(const CBlockIndex& block)
{
arith_uint256 bnTarget;
@@ -365,8 +364,6 @@ arith_uint256 GetBlockProof(const CBlockIndex& block)
bool fOverflow;
bnTarget.SetCompact(block.nBits, &fNegative, &fOverflow);
// TODO(miketout): proof of stake blocks must be marked as having the minimum POW in this context
if (fNegative || fOverflow || bnTarget == 0)
return 0;
// We need to compute 2**256 / (bnTarget+1), but we can't represent 2**256