This commit is contained in:
jl777
2016-10-20 12:37:17 -03:00
parent a89ac4dc84
commit 493a9ec751

View File

@@ -124,12 +124,12 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
//fprintf(stderr," height.%d special.%d nonz.%d\n",height,special,nonz); //fprintf(stderr," height.%d special.%d nonz.%d\n",height,special,nonz);
if ( nonz == 0 ) if ( nonz == 0 )
return(true); return(true);
if ( special < 0 ) // special notary id == (height % numnotaries) if ( special > 0 ) // special notary id == (height % numnotaries)
{ {
if (UintToArith256(hash) <= bnTarget) // accept normal diff if (UintToArith256(hash) <= bnTarget) // accept normal diff
return true; return true;
bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow); bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow);
} else bnTarget /= 8; } //else bnTarget /= 8;
} }
// Check range // Check range
if (fNegative || bnTarget == 0 || fOverflow || bnTarget > UintToArith256(params.powLimit)) if (fNegative || bnTarget == 0 || fOverflow || bnTarget > UintToArith256(params.powLimit))