From 00326dae4e34143e856700f335f4de00fb2b0ea9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 27 Jul 2016 15:24:22 -0300 Subject: [PATCH] test --- iguana/iguana777.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 306484d81..60e5db1cf 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -714,12 +714,12 @@ void iguana_coinloop(void *arg) if ( coin->MAXPEERS > IGUANA_MINPEERS ) coin->MAXPEERS = IGUANA_MINPEERS; } - if ( coin->isRT != 0 && coin->current != 0 && coin->numverified >= coin->current->hdrsi ) + /*if ( coin->isRT != 0 && coin->current != 0 && coin->numverified >= coin->current->hdrsi ) { //static int32_t saved; //if ( saved++ == 0 ) // iguana_coinflush(coin,1); - } + }*/ if ( coin->bindsock >= 0 ) { if ( coin->MAXPEERS > 1 && coin->peers->numranked < IGUANA_MAXPEERS/2 && now > coin->lastpossible+10 ) @@ -734,6 +734,7 @@ void iguana_coinloop(void *arg) { if ( coin->MAXPEERS > 1 && coin->peers->numranked < ((7*coin->MAXPEERS)>>3) && now > coin->lastpossible+10 ) { + printf("%s send ping? %d\n",coin->symbol,coin->peers != 0 ? coin->peers->numranked : -1); if ( coin->peers->numranked > 0 && (now % 60) == 0 ) iguana_send_ping(myinfo,coin,coin->peers->ranked[rand() % coin->peers->numranked]); coin->lastpossible = iguana_possible_peer(coin,0); // tries to connect to new peers @@ -741,13 +742,15 @@ void iguana_coinloop(void *arg) } if ( coin->MAXPEERS > 1 && now > coin->peers->lastmetrics+10 ) { - //fprintf(stderr,"metrics\n"); + fprintf(stderr,"%s call updatemetrics\n",coin->symbol); coin->peers->lastmetrics = iguana_updatemetrics(myinfo,coin); // ranks peers + fprintf(stderr,"%s back updatemetrics\n",coin->symbol); } //if ( coin->longestchain+10000 > coin->blocks.maxbits ) // iguana_recvalloc(coin,coin->longestchain + 100000); if ( coin->RELAYNODE != 0 || coin->VALIDATENODE != 0 || coin->MAXPEERS == 1 ) { + printf("%s call processrecv\n",coin->symbol); flag += iguana_processrecv(myinfo,coin); if ( coin->RTheight > 0 && coin->RTheight > coin->chain->bundlesize ) { @@ -757,12 +760,13 @@ void iguana_coinloop(void *arg) bp->weights = iguana_PoS_weights(myinfo,coin,&refP,&bp->supply,&bp->numweights,&nonz,&errs,bp->bundleheight); } } + printf("%s call jsonQ\n",coin->symbol); iguana_jsonQ(); } else printf("skip %s\n",coin->symbol); coin->idletime = (uint32_t)time(NULL); } } - printf("flag.%d isRT.%d polltimeout.%d numranked.%d\n",flag,coin->isRT,coin->polltimeout,coin->peers->numranked); + printf("%s flag.%d isRT.%d polltimeout.%d numranked.%d\n",coin->symbol,flag,coin->isRT,coin->polltimeout,coin->peers->numranked); if ( flag == 0 && coin->isRT == 0 && coin->peers != 0 ) usleep(coin->polltimeout*1000 + (coin->peers->numranked == 0)*1000000); else if ( coin->current != 0 && coin->current->hdrsi == coin->longestchain/coin->chain->bundlesize )