This commit is contained in:
jl777
2016-11-13 09:38:19 -03:00
parent 29f7f216a8
commit 6687cc6efb
2 changed files with 5 additions and 4 deletions

View File

@@ -479,7 +479,7 @@ int32_t komodo_is_special(int32_t height,uint8_t pubkey33[33])
if ( Minerids[height - i] == -2 )
{
//fprintf(stderr,"second -2 for Minerids[%d] current.%d\n",height-i,CURRENT_HEIGHT);
return(0);
return(-2);
}
}
if ( Minerids[height-i] == notaryid )

View File

@@ -111,7 +111,7 @@ extern int8_t Minerids[1024 * 1024 * 5]; // 5 million blocks
bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned int nBits, const Consensus::Params& params)
{
bool fNegative,fOverflow; int32_t i,nonz=0,special,notaryid,flag = 0;
bool fNegative,fOverflow; int32_t i,nonz=0,special,special2,notaryid,flag = 0;
arith_uint256 bnTarget;
bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
@@ -131,8 +131,9 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in
{
if ( notaryid >= 0 )
{
if ( (height < 70000 && (special != 0 || komodo_is_special(height,pubkey33) > 0)) ||
(height >= 70000 && komodo_is_special(height,pubkey33) > 0) )
special2 = komodo_is_special(height,pubkey33);
if ( special2 == -2 || (height < 70000 && (special != 0 || special2 > 0)) ||
(height >= 70000 && special2 > 0) )
{
bnTarget.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow);
flag = 1;