|
|
@ -808,7 +808,7 @@ int32_t iguana_bundlefinish(struct iguana_info *coin,struct iguana_bundle *bp) |
|
|
|
} |
|
|
|
#endif |
|
|
|
for (i=0; i<bp->hdrsi; i++) |
|
|
|
if ( (prevbp= coin->bundles[i]) == 0 || prevbp->emitfinish < coin->startutc || (i < bp->hdrsi-IGUANA_NUMHELPERS/3 && prevbp->utxofinish <= 1) |
|
|
|
if ( (prevbp= coin->bundles[i]) == 0 || prevbp->emitfinish < coin->startutc || (i < bp->hdrsi-8 && prevbp->utxofinish <= 1) |
|
|
|
) |
|
|
|
break; |
|
|
|
if ( i == bp->hdrsi && coin->emitbusy <= (IGUANA_NUMHELPERS/3) ) |
|
|
@ -840,7 +840,6 @@ 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);
|
|
|
|
range = coin->MAXBUNDLES; |
|
|
|
currentbp = coin->current; |
|
|
|
lastbp = coin->lastpending; |
|
|
@ -855,13 +854,14 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru |
|
|
|
{ |
|
|
|
iguana_autoextend(coin,bp); |
|
|
|
} |
|
|
|
bp->nexttime = (uint32_t)(time(NULL) + 1);//(bp->hdrsi - starti) + 1);
|
|
|
|
bp->nexttime = (uint32_t)(time(NULL) + 0); |
|
|
|
if ( bp->numhashes < bp->n && bp->bundleheight < coin->longestchain-coin->chain->bundlesize ) |
|
|
|
iguana_bundlehdr(coin,bp,starti); |
|
|
|
else if ( bp->emitfinish != 0 ) |
|
|
|
{ |
|
|
|
if ( bp->emitfinish > 1 ) |
|
|
|
{ |
|
|
|
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); |
|
|
|
if ( (retval= iguana_bundlefinish(coin,bp)) > 0 ) |
|
|
|
{ |
|
|
|
//printf("moved to balancesQ.%d bundleiters.%d\n",bp->hdrsi,bp->bundleheight);
|
|
|
|