|
|
@ -381,14 +381,15 @@ int32_t iguana_bundleissue(struct iguana_info *coin,struct iguana_bundle *bp,int |
|
|
|
starti = coin->current->hdrsi; |
|
|
|
else starti = 0; |
|
|
|
priority = (bp->hdrsi < starti + coin->peers.numranked); |
|
|
|
lag = (bp->hdrsi - starti); |
|
|
|
/*lag = (bp->hdrsi - starti);
|
|
|
|
lag *= lag; |
|
|
|
if ( (i= sqrt(bp->hdrsi)) < 2 ) |
|
|
|
i = 2; |
|
|
|
if ( lag < i ) |
|
|
|
lag = i; |
|
|
|
else if ( lag > 10*i ) |
|
|
|
lag = 10*i; |
|
|
|
lag = 10*i;*/ |
|
|
|
lag = 10; |
|
|
|
if ( (numpeers= coin->peers.numranked) > 8 )//&& bp->currentflag < bp->n )
|
|
|
|
{ |
|
|
|
if ( bp->currentflag == 0 ) |
|
|
@ -525,7 +526,7 @@ int32_t iguana_bundleissue(struct iguana_info *coin,struct iguana_bundle *bp,int |
|
|
|
} |
|
|
|
} |
|
|
|
if ( flag != 0 && priority != 0 && laggard != 0 ) |
|
|
|
printf("reissued.%d currentflag.%d ht.%d s.%d finished.%d most.%d laggards.%d maxunfinished.%d\n",flag,bp->currentflag,bp->bundleheight,bp->numsaved,finished,doneval,laggard,maxval); |
|
|
|
printf("[%d] reissued.%d currentflag.%d ht.%d s.%d finished.%d most.%d laggards.%d maxunfinished.%d\n",bp->hdrsi,flag,bp->currentflag,bp->bundleheight,bp->numsaved,finished,doneval,laggard,maxval); |
|
|
|
} |
|
|
|
} |
|
|
|
if ( bp == coin->current ) |
|
|
@ -747,7 +748,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru |
|
|
|
coin->numbundlesQ--; |
|
|
|
iguana_bundlecalcs(coin,bp); |
|
|
|
//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);
|
|
|
|
bp->nexttime = (uint32_t)(time(NULL) + 1*0);//(bp->hdrsi - starti) + 1);
|
|
|
|
bp->nexttime = (uint32_t)(time(NULL) + 1);//(bp->hdrsi - starti) + 1);
|
|
|
|
if ( bp->numhashes < bp->n && bp->bundleheight < coin->longestchain-coin->chain->bundlesize ) |
|
|
|
iguana_bundlehdr(coin,bp,starti); |
|
|
|
else if ( bp->emitfinish != 0 ) |
|
|
@ -794,7 +795,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru |
|
|
|
{ |
|
|
|
max = bp->n; |
|
|
|
counter = iguana_bundleissue(coin,bp,max,timelimit); |
|
|
|
if ( 0 && counter > 0 ) |
|
|
|
if ( 1 && counter > 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); |
|
|
|
} |
|
|
|
iguana_bundleQ(coin,bp,1000); |
|
|
|