From 9e3ac41c03179403e7123d45af5d72d0c9434e42 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 13 Jan 2016 14:49:17 -0300 Subject: [PATCH] test --- iguana/iguana_bundles.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index 6a6869549..9180029f4 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -563,7 +563,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; uint32_t now; struct iguana_block *block; double endmillis = OS_milliseconds() + timelimit; - printf("ITERATE bundle.%d r.%d s.%d finished.%d\n",bp->bundleheight,bp->numrecv,bp->numsaved,bp->emitfinish); + printf("ITERATE bundle.%d n.%d r.%d s.%d finished.%d\n",bp->bundleheight,bp->n,bp->numrecv,bp->numsaved,bp->emitfinish); memset(bp->issued,0,sizeof(bp->issued)); while ( bp->emitfinish == 0 && OS_milliseconds() < endmillis ) { @@ -585,12 +585,15 @@ void iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int32_ } usleep(1000); } - if ( bp->numsaved >= bp->n && bp->emitfinish == 0 ) + if ( bp->emitfinish == 0 ) { - printf(">>>>>>>>>>>>>>>>>>>>>>> EMIT bundle.%d\n",bp->bundleheight); - bp->emitfinish = 1; - iguana_emitQ(coin,bp); - return; + if ( bp->numsaved >= bp->n ) + { + printf(">>>>>>>>>>>>>>>>>>>>>>> EMIT bundle.%d\n",bp->bundleheight); + bp->emitfinish = 1; + iguana_emitQ(coin,bp); + return; + } + iguana_bundleQ(coin,bp,timelimit); } - iguana_bundleQ(coin,bp,timelimit); }