|
|
@ -113,6 +113,8 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in |
|
|
|
arith_uint256 bnTarget; |
|
|
|
|
|
|
|
bnTarget.SetCompact(nBits, &fNegative, &fOverflow); |
|
|
|
if ( height == 0 ) |
|
|
|
height = chainActive.Tip()->nHeight + 1; |
|
|
|
if ( height > 34000 ) // 0 -> non-special notary
|
|
|
|
{ |
|
|
|
special = komodo_chosennotary(¬aryid,height,pubkey33); |
|
|
@ -139,7 +141,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in |
|
|
|
flag = 1; |
|
|
|
} //else bnTarget /= 8;
|
|
|
|
} |
|
|
|
else if ( height == 0 && KOMODO_CHOSEN_ONE != 0 ) |
|
|
|
/*else if ( height == 0 && KOMODO_CHOSEN_ONE != 0 )
|
|
|
|
{ |
|
|
|
extern uint8_t NOTARY_PUBKEY33[33]; |
|
|
|
bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow); |
|
|
@ -147,7 +149,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in |
|
|
|
special = 1; |
|
|
|
notaryid = -1; |
|
|
|
printf("KOMODO_CHOSEN_ONE -> MINDIFF\n"); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
// Check range
|
|
|
|
if (fNegative || bnTarget == 0 || fOverflow || bnTarget > UintToArith256(params.powLimit)) |
|
|
|
return error("CheckProofOfWork(): nBits below minimum work"); |
|
|
|