diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index a042f1898..2c6b8cf73 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -140,7 +140,7 @@ uint64_t komodo_paxtotal() return(0); HASH_ITER(hh,PAX,pax,tmp) { - printf("pax.%s marked.%d %.8f -> %.8f\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis)); + //printf("pax.%s marked.%d %.8f -> %.8f\n",pax->symbol,pax->marked,dstr(pax->komodoshis),dstr(pax->fiatoshis)); if ( pax->marked == 0 ) { if ( komodo_is_issuer() != 0 ) diff --git a/src/miner.cpp b/src/miner.cpp index 722042db6..51ab93350 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -130,7 +130,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) deposits = komodo_paxtotal(); if ( KOMODO_INITDONE == 0 || (isrealtime= komodo_isrealtime(&kmdheight)) == 0 ) { - fprintf(stderr,"INITDONE.%d RT.%d deposits %.8f ht.%d\n",KOMODO_INITDONE,isrealtime,(double)deposits/COIN,kmdheight); + //fprintf(stderr,"INITDONE.%d RT.%d deposits %.8f ht.%d\n",KOMODO_INITDONE,isrealtime,(double)deposits/COIN,kmdheight); } else if ( deposits != 0 ) break; @@ -604,7 +604,8 @@ void static BitcoinMiner(CWallet *pwallet) } else Mining_start = 0; while (true) { - //fprintf(stderr,"%s start mining loop\n",ASSETCHAINS_SYMBOL); + if ( ASSETCHAINS_SYMBOL[0] != 0 ) + fprintf(stderr,"%s start mining loop\n",ASSETCHAINS_SYMBOL); // Hash state KOMODO_CHOSEN_ONE = 0; crypto_generichash_blake2b_state state; @@ -631,8 +632,8 @@ void static BitcoinMiner(CWallet *pwallet) solutionTargetChecks.increment(); if ( UintToArith256(pblock->GetHash()) > hashTarget ) { - //if ( ASSETCHAINS_SYMBOL[0] != 0 ) - // printf("missed target\n"); + if ( ASSETCHAINS_SYMBOL[0] != 0 ) + printf("missed target\n"); return false; } if ( ASSETCHAINS_SYMBOL[0] == 0 && Mining_start != 0 && time(NULL) < Mining_start+ROUNDROBIN_DELAY ) @@ -723,24 +724,27 @@ void static BitcoinMiner(CWallet *pwallet) if (vNodes.empty() && chainparams.MiningRequiresPeers()) { if ( ASSETCHAINS_SYMBOL[0] == 0 || Mining_height >= 100 ) + { + fprintf(stderr,"no nodes, break\n"); break; + } } if ((UintToArith256(pblock->nNonce) & 0xffff) == 0xffff) { if ( ASSETCHAINS_SYMBOL[0] != 0 ) - printf("0xffff, break\n"); + fprintf(stderr,"0xffff, break\n"); break; } if (mempool.GetTransactionsUpdated() != nTransactionsUpdatedLast && GetTime() - nStart > 60) { - //if ( ASSETCHAINS_SYMBOL[0] != 0 ) - // printf("timeout, break\n"); + if ( ASSETCHAINS_SYMBOL[0] != 0 ) + fprintf(stderr,"timeout, break\n"); break; } if ( pindexPrev != chainActive.Tip() ) { - //if ( ASSETCHAINS_SYMBOL[0] != 0 ) - // printf("Tip advanced, break\n"); + if ( ASSETCHAINS_SYMBOL[0] != 0 ) + fprintf(stderr,"Tip advanced, break\n"); break; } // Update nNonce and nTime