This commit is contained in:
jl777
2016-12-11 09:38:08 +02:00
parent 72da1eea47
commit ff67b2413e

View File

@@ -145,6 +145,8 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
return error("CheckProofOfWork(): nBits below minimum work"); return error("CheckProofOfWork(): nBits below minimum work");
// Check proof of work matches claimed amount // Check proof of work matches claimed amount
if ( UintToArith256(hash) > bnTarget ) if ( UintToArith256(hash) > bnTarget )
{
if ( (KOMODO_REWIND == 0 && height > 108000) || height <= KOMODO_REWIND )
{ {
int32_t i; int32_t i;
for (i=31; i>=0; i--) for (i=31; i>=0; i--)
@@ -153,9 +155,9 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
for (i=31; i>=0; i--) for (i=31; i>=0; i--)
printf("%02x",((uint8_t *)&bnTarget)[i]); printf("%02x",((uint8_t *)&bnTarget)[i]);
printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35)); printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35));
if ( (KOMODO_REWIND == 0 && height > 108000) || height <= KOMODO_REWIND )
return error("CheckProofOfWork(): hash doesn't match nBits"); return error("CheckProofOfWork(): hash doesn't match nBits");
} }
}
return true; return true;
} }