From 9aff7852f25cded3eec698c963fbd4f7e4aec4e0 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 13 Jan 2016 16:27:17 -0300 Subject: [PATCH] test --- iguana/iguana_bundles.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index a9ac88c49..5984898c7 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -562,7 +562,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str) void iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int32_t timelimit) { - int32_t i,n,pend; uint32_t now; struct iguana_block *block; double endmillis; + int32_t i,n,pend,counter = 0; uint32_t now; struct iguana_block *block; double endmillis; for (i=pend=0; ipeers.active[i].pendblocks; if ( pend >= coin->MAXPENDING*coin->MAXPEERS ) @@ -585,13 +585,14 @@ void iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int32_ printf("(%d:%d) ",bp->hdrsi,i); iguana_blockQ(coin,bp,i,block->RO.hash2,bp->numsaved > bp->n-10); bp->issued[i] = now; + counter++; } else if ( block->fpipbits != 0 ) n++; } else printf("iguana_bundleiters[%d] unexpected null block[%d]\n",bp->bundleheight,i); bp->numsaved = n; } - usleep(1000); + usleep(10000); } printf("ITERATE bundle.%d n.%d r.%d s.%d finished.%d\n",bp->bundleheight,bp->n,bp->numrecv,bp->numsaved,bp->emitfinish); if ( bp->emitfinish == 0 ) @@ -603,6 +604,6 @@ void iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int32_ iguana_emitQ(coin,bp); return; } - iguana_bundleQ(coin,bp,1000); + iguana_bundleQ(coin,bp,counter == 0 ? 5000 : 1000); } }