Fix easy diff check for PoS

This commit is contained in:
jl777
2018-07-08 00:13:09 -11:00
parent 42c0fc6a63
commit 196c69f770
2 changed files with 3 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
Copyright (c) 2016-2018 The Komodo developers
Copyright (c) 2016-2017 The Zcash developers Copyright (c) 2016-2017 The Zcash developers
Copyright (c) 2009-2017 The Bitcoin Core developers Copyright (c) 2009-2017 The Bitcoin Core developers

View File

@@ -190,6 +190,8 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash,unsigned int
} }
if (fNegative || bnTarget == 0 || fOverflow || bnTarget > UintToArith256(params.powLimit)) if (fNegative || bnTarget == 0 || fOverflow || bnTarget > UintToArith256(params.powLimit))
return error("CheckProofOfWork(): nBits below minimum work"); return error("CheckProofOfWork(): nBits below minimum work");
if ( height >= 4000 && ASSETCHAINS_STAKED != 0 )
bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow);
// Check proof of work matches claimed amount // Check proof of work matches claimed amount
if ( UintToArith256(hash) > bnTarget ) if ( UintToArith256(hash) > bnTarget )
{ {