From ee12a958868d9a2d7fd6c1005a0f07ed66fde94d Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 28 Mar 2016 00:20:42 -0300 Subject: [PATCH] test --- iguana/iguana777.c | 8 ++++---- iguana/iguana_bundles.c | 8 ++++---- iguana/iguana_unspents.c | 2 +- iguana/main.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 9e0183a4a..6dddf1edf 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -282,7 +282,7 @@ void iguana_bundleQ(struct iguana_info *coin,struct iguana_bundle *bp,int32_t ti ptr->starttime = (uint32_t)time(NULL); ptr->timelimit = timelimit; coin->numbundlesQ++; - if ( bp->hdrsi > 170 ) + if ( 0 && bp->hdrsi > 170 ) printf("%s %p bundle.%d[%d] ht.%d emitfinish.%u\n",coin->symbol,bp,ptr->hdrsi,bp->n,bp->bundleheight,bp->emitfinish); queue_enqueue("bundlesQ",&bundlesQ,&ptr->DL,0); } @@ -407,7 +407,7 @@ void iguana_helper(void *arg) }*/ if ( (helperid % IGUANA_NUMHELPERS) == (0 % IGUANA_NUMHELPERS) && (ptr= queue_dequeue(&bundlesQ,0)) != 0 ) { - printf("bundleQ size.%d\n",queue_size(&bundlesQ)); + //printf("bundleQ size.%d\n",queue_size(&bundlesQ)); idle = 0; coin = ptr->coin; if ( (bp= ptr->bp) != 0 && coin != 0 ) @@ -417,7 +417,7 @@ void iguana_helper(void *arg) flag += iguana_bundleiters(ptr->coin,&MEM,MEMB,bp,ptr->timelimit); else { - printf("skip.%d lag.%ld coin->active.%d\n",bp->hdrsi,time(NULL)-bp->nexttime,coin->active); + //printf("skip.%d lag.%ld coin->active.%d\n",bp->hdrsi,time(NULL)-bp->nexttime,coin->active); iguana_bundleQ(ptr->coin,bp,1000); } if ( coin->current != 0 && coin->current->hdrsi != coin->bundlescount-1 ) @@ -429,7 +429,7 @@ void iguana_helper(void *arg) } if ( (helperid % IGUANA_NUMHELPERS) == (1 % IGUANA_NUMHELPERS) && (ptr= queue_dequeue(&spendvectorsQ,0)) != 0 ) { - printf("spendvectorsQ size.%d\n",queue_size(&spendvectorsQ)); + //printf("spendvectorsQ size.%d\n",queue_size(&spendvectorsQ)); coin = ptr->coin; if ( (bp= ptr->bp) != 0 && coin != 0 ) { diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index c81fc4382..6c4c73d4c 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -799,7 +799,7 @@ int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp) int32_t iguana_bundlefinish(struct iguana_info *coin,struct iguana_bundle *bp) { - struct iguana_bundle *prevbp; int32_t i,retval; + struct iguana_bundle *prevbp; int32_t i; #ifdef IGUANA_SERIALIZE_SPENDVECTORGEN //if ( coin->MAXMEM <= 4*(1024L * 1024 * 1024) ) { @@ -811,7 +811,7 @@ int32_t iguana_bundlefinish(struct iguana_info *coin,struct iguana_bundle *bp) if ( (prevbp= coin->bundles[i]) == 0 || prevbp->emitfinish < coin->startutc || (i < bp->hdrsi-IGUANA_NUMHELPERS && prevbp->utxofinish <= 1) ) break; - if ( i == bp->hdrsi && coin->emitbusy <= 0 ) + if ( i == bp->hdrsi && coin->emitbusy <= 1 ) { if ( bp->startutxo == 0 ) { @@ -840,7 +840,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru } if ( coin->current == 0 ) coin->current = coin->bundles[0]; - printf("ITER now.%u spec.%-4d bundle.%-4d h.%-4d r.%-4d s.%-4d F.%d T.%d issued.%d mb.%d/%d\n",(uint32_t)time(NULL),bp->numspec,bp->bundleheight/coin->chain->bundlesize,bp->numhashes,bp->numrecv,bp->numsaved,bp->emitfinish,timelimit,counter,coin->MAXBUNDLES,coin->bundlescount); + //printf("ITER now.%u spec.%-4d bundle.%-4d h.%-4d r.%-4d s.%-4d F.%d T.%d issued.%d mb.%d/%d\n",(uint32_t)time(NULL),bp->numspec,bp->bundleheight/coin->chain->bundlesize,bp->numhashes,bp->numrecv,bp->numsaved,bp->emitfinish,timelimit,counter,coin->MAXBUNDLES,coin->bundlescount); range = coin->MAXBUNDLES; currentbp = coin->current; lastbp = coin->lastpending; @@ -954,7 +954,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru } } } - } + } else bp->nexttime += 10; //printf("done hdrs.%d\n",bp->hdrsi); iguana_bundleQ(coin,bp,1000); return(retval); diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 62a8dc2bc..f18f5205c 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -1430,7 +1430,7 @@ int32_t iguana_balancecalc(struct iguana_info *coin,struct iguana_bundle *bp,int iguana_validateQ(coin,bp); return(flag); } - bp->nexttime = (uint32_t)time(NULL) + 1;// + cbrt(bp->hdrsi); + bp->nexttime = (uint32_t)time(NULL); if ( bp != 0 && coin != 0 && (bp->hdrsi == 0 || (prevbp= coin->bundles[bp->hdrsi-1]) != 0) ) { #ifdef IGUANA_SERIALIZE_BALANCEGEN diff --git a/iguana/main.c b/iguana/main.c index a8196f84a..4abacf8e3 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -410,7 +410,7 @@ void mainloop(struct supernet_info *myinfo) iguana_jsonQ(); pangea_queues(SuperNET_MYINFO(0)); if ( flag == 0 ) - usleep(50000); + usleep(10000); } }