This commit is contained in:
jl777
2016-10-20 11:20:03 -03:00
parent 81a77e922a
commit 681589a5b1
2 changed files with 10 additions and 8 deletions

View File

@@ -114,10 +114,16 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
if ( (special= komodo_heightnotary(height,pubkey33)) != 0 ) // 0 -> non-special notary
{
int32_t i;
int32_t i,nonz = 0;
for (i=0; i<33; i++)
{
if ( pubkey33[i] != 0 )
nonz++;
fprintf(stderr,"%02x",pubkey33[i]);
fprintf(stderr," height.%d special.%d\n",height,special);
}
fprintf(stderr," height.%d special.%d nonz.%d\n",height,special,nonz);
if ( nonz == 0 )
return(true);
if ( special < 0 ) // non-notary node
bnTarget /= 8;
else // special notary id == (height % numnotaries)