diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index f6795661e..25be4227a 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -573,7 +573,7 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above block is valid pax pricing { - int32_t i,j,n,num,opretlen,offset=1,errs=0,matched=0,kmdheights[64],otherheights[64]; uint256 hash,txids[64]; char symbol[16],base[16]; uint16_t vouts[64]; int8_t baseids[64]; uint8_t *script,opcode,rmd160s[64*20]; uint64_t available,deposited,issued,withdrawn,approved,redeemed; int64_t values[64],srcvalues[64]; struct pax_transaction *pax; + int32_t i,j,n,ht,num,opretlen,offset=1,errs=0,matched=0,kmdheights[64],otherheights[64]; uint256 hash,txids[64]; char symbol[16],base[16]; uint16_t vouts[64]; int8_t baseids[64]; uint8_t *script,opcode,rmd160s[64*20]; uint64_t available,deposited,issued,withdrawn,approved,redeemed; int64_t values[64],srcvalues[64]; struct pax_transaction *pax; if ( KOMODO_PAX == 0 ) return(0); memset(baseids,0xff,sizeof(baseids)); @@ -655,9 +655,9 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above printf(" kht.%d ht.%d %.8f %.8f blockhash couldnt find vout.[%d]\n",kmdheights[i-1],otherheights[i-1],dstr(values[i-1]),dstr(srcvalues[i]),i); } } - if ( height <= chainActive.Tip()->nHeight && matched != num ) + if ( (height < chainActive.Tip()->nHeight || (height >= chainActive.Tip()->nHeight && komodo_isrealtime(&ht) != 0)) && matched != num ) { - printf("WOULD REJECT %s: ht.%d (%c) matched.%d vs num.%d\n",symbol,height,opcode,matched,num); + printf("WOULD REJECT %s: ht.%d (%c) matched.%d vs num.%d tip.%d isRT.%d\n",symbol,height,opcode,matched,num,(int32_t)chainActive.Tip()->nHeight,komodo_isrealtime(&ht)); // can easily happen depending on order of loading if ( height > 200000 ) { @@ -1050,7 +1050,8 @@ void komodo_passport_iteration() isrealtime = 1; RTmask |= (1LL << baseid); memcpy(refsp->RTbufs[baseid+1],buf,sizeof(refsp->RTbufs[baseid+1])); - } else fprintf(stderr,"[%s]: %s not RT %u %u %d\n",ASSETCHAINS_SYMBOL,base,buf[0],buf[1],(int32_t)(time(NULL)-buf[2])); + } else if ( (time(NULL)-buf[2]) > 1200 ) + fprintf(stderr,"[%s]: %s not RT %u %u %d\n",ASSETCHAINS_SYMBOL,base,buf[0],buf[1],(int32_t)(time(NULL)-buf[2])); } //else fprintf(stderr,"%s size error RT\n",base); fclose(fp); } //else fprintf(stderr,"%s open error RT\n",base); diff --git a/src/komodo_pax.h b/src/komodo_pax.h index 79f01aefe..3885736e0 100644 --- a/src/komodo_pax.h +++ b/src/komodo_pax.h @@ -600,7 +600,8 @@ uint64_t PAX_fiatdest(uint64_t *seedp,int32_t tokomodo,char *destaddr,uint8_t pu *seedp = 0; if ( (baseid= komodo_baseid(origbase)) < 0 || baseid == MAX_CURRENCIES ) { - printf("[%s] PAX_fiatdest illegal base.(%s)\n",ASSETCHAINS_SYMBOL,origbase); + if ( origbase[0] != 0 ) + printf("[%s] PAX_fiatdest illegal base.(%s)\n",ASSETCHAINS_SYMBOL,origbase); return(0); } for (i=0; i<3; i++) diff --git a/src/miner.cpp b/src/miner.cpp index 0fb829383..5abaae651 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -544,9 +544,9 @@ void static BitcoinMiner(CWallet *pwallet) komodo_chosennotary(¬aryid,chainActive.Tip()->nHeight,NOTARY_PUBKEY33); std::string solver; - if ( notaryid >= 0 || ASSETCHAINS_SYMBOL[0] != 0 ) + //if ( notaryid >= 0 || ASSETCHAINS_SYMBOL[0] != 0 ) solver = "tromp"; - else solver = "default"; + //else solver = "default"; assert(solver == "tromp" || solver == "default"); LogPrint("pow", "Using Equihash solver \"%s\" with n = %u, k = %u\n", solver, n, k); //fprintf(stderr,"Mining with %s\n",solver.c_str()); @@ -697,7 +697,7 @@ void static BitcoinMiner(CWallet *pwallet) }; // TODO: factor this out into a function with the same API for each solver. - if (solver == "tromp" && notaryid >= 0 ) { + if (solver == "tromp" ) { //&& notaryid >= 0 ) { // Create solver and initialize it. equi eq(1); eq.setstate(&curr_state);