From 6458297e3037e807787c170fc34e9056dbd6a1e6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 7 Nov 2016 09:16:20 -0300 Subject: [PATCH] test --- src/komodo.h | 2 +- src/komodo_gateway.h | 5 +++-- src/miner.cpp | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index be41bed06..2c812bc38 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -152,7 +152,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar } if ( height <= 0 ) { - printf("early return: stateupdate height.%d\n",height); + //printf("early return: stateupdate height.%d\n",height); return; } if ( fp != 0 ) // write out funcid, height, other fields, call side effect function diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 6e147e650..b3d5da869 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -174,10 +174,10 @@ void komodo_gateway_deposits(CMutableTransaction *txNew,int32_t shortflag,char * } data[len++] = pax->vout & 0xff; data[len++] = (pax->vout >> 8) & 0xff; - printf(" vout.%u DEPOSIT %.8f <- paxdeposit.%s\n",pax->vout,(double)txNew->vout[numvouts].nValue/COIN,symbol); if ( strcmp(symbol,"KMD") != 0 ) PENDING_KOMODO_TX += pax->fiatoshis; else PENDING_KOMODO_TX += pax->komodoshis; + printf(" vout.%u DEPOSIT %.8f <- paxdeposit.%s pending %.8f\n",pax->vout,(double)txNew->vout[numvouts].nValue/COIN,symbol,dstr(PENDING_KOMODO_TX)); if ( numvouts++ >= 64 ) break; tmp = pax; @@ -470,7 +470,8 @@ void komodo_gateway_iteration(char *symbol) printf("error from %s\n",symbol); sleep(30); } - KOMODO_DEPOSIT = komodo_paxtotal(); + if ( (KOMODO_DEPOSIT= komodo_paxtotal()) != 0 ) + printf("KOMODO_DEPOSIT %.8f RT.%u\n",dstr(KOMODO_DEPOSIT),KOMODO_REALTIME); } void komodo_iteration(char *symbol) diff --git a/src/miner.cpp b/src/miner.cpp index dc4d9f416..06c1aac80 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -113,6 +113,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) if(!pblocktemplate.get()) return NULL; CBlock *pblock = &pblocktemplate->block; // pointer for convenience + fprintf(stderr,"CreateNewBlock initdone.%d deposit %.8f\n",KOMODO_INITDONE,dstr(KOMODO_DEPOSIT)); while ( chainActive.Tip()->nHeight > ASSETCHAINS_MINHEIGHT && mempool.GetTotalTxSize() <= 0 ) { sleep(10); @@ -442,7 +443,7 @@ int32_t komodo_chosennotary(int32_t *notaryidp,int32_t height,uint8_t *pubkey33) CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) { CPubKey pubkey; CScript scriptPubKey; uint8_t *script,*ptr; int32_t i; - //fprintf(stderr,"%s createnewblockwith key\n",ASSETCHAINS_SYMBOL); + fprintf(stderr,"%s createnewblockwith key\n",ASSETCHAINS_SYMBOL); if ( USE_EXTERNAL_PUBKEY != 0 ) { //fprintf(stderr,"use notary pubkey\n"); @@ -557,7 +558,7 @@ void static BitcoinMiner(CWallet *pwallet) } while (true); //fprintf(stderr,"%s Found peers\n",ASSETCHAINS_SYMBOL); } - //fprintf(stderr,"%s create new block\n",ASSETCHAINS_SYMBOL); + fprintf(stderr,"%s create new block\n",ASSETCHAINS_SYMBOL); // // Create new block //