|
|
@ -874,12 +874,12 @@ int32_t iguana_bundlemissings(struct iguana_info *coin,struct iguana_bundle *bp, |
|
|
|
lag = 3; |
|
|
|
if ( bp->numissued < bp->n ) |
|
|
|
max = bp->numissued; |
|
|
|
else max = bp->origmissings; |
|
|
|
if ( bp->missingstime == 0 || bp->numissued < bp->n || bp == coin->current || missing < max || time(NULL) > bp->missingstime+lag ) |
|
|
|
else max = bp->n;//origmissings;
|
|
|
|
if ( bp->missingstime == 0 || bp->numissued < bp->n || bp == coin->current || missing < (max >> 3) || time(NULL) > bp->missingstime+lag ) |
|
|
|
{ |
|
|
|
if ( (n= iguana_bundlerequests(coin,missings,&bp->origmissings,&tmp,bp,lag)) > 0 ) |
|
|
|
{ |
|
|
|
printf("bundle.[%d] numissued.%d missings.%d n.%d capacity %d -> %d\n",bp->hdrsi,bp->numissued,bp->origmissings,n,capacity,capacity-n); |
|
|
|
//printf("bundle.[%d] numissued.%d missings.%d n.%d capacity %d -> %d\n",bp->hdrsi,bp->numissued,bp->origmissings,n,capacity,capacity-n);
|
|
|
|
bp->numissued += n; |
|
|
|
capacity -= n; |
|
|
|
bp->missingstime = (uint32_t)time(NULL); |
|
|
|