diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 9c58aee39..b37a4dfa7 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -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 ) diff --git a/src/pow.cpp b/src/pow.cpp index 3e1822566..119544ec0 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -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;