diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 7d13977a7..b37a4dfa7 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -451,7 +451,7 @@ int8_t komodo_minerid(int32_t height) { static uint32_t depth; int32_t notaryid; CBlockIndex *pindex; uint8_t pubkey33[33]; - if ( depth == 0 && height <= CURRENT_HEIGHT )//chainActive.Tip()->nHeight ) + if ( depth < 3 && height <= CURRENT_HEIGHT )//chainActive.Tip()->nHeight ) { if ( (pindex= chainActive[height]) != 0 ) { @@ -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/komodo_gateway.h b/src/komodo_gateway.h index fdb4251f2..1cda66399 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -265,7 +265,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above if ( pax->marked != 0 ) errs++; else matched++; - if ( opcode == 'X' ) + if ( 0 && opcode == 'X' ) printf("errs.%d i.%d match %.8f == %.8f\n",errs,i,dstr(pax != 0 ? pax->fiatoshis:-1),dstr(block.vtx[0].vout[i].nValue)); } else 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;