Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
d5f31bb916
  1. 6
      iguana/iguana_bundles.c

6
iguana/iguana_bundles.c

@ -874,8 +874,10 @@ int32_t iguana_bundlemissings(struct iguana_info *coin,struct iguana_bundle *bp,
{ {
uint8_t missings[IGUANA_MAXBUNDLESIZE/8+1]; int32_t tmp,missing,avail,n,max; uint8_t missings[IGUANA_MAXBUNDLESIZE/8+1]; int32_t tmp,missing,avail,n,max;
missing = iguana_blocksmissing(coin,&avail,missings,0,bp,0,lag); missing = iguana_blocksmissing(coin,&avail,missings,0,bp,0,lag);
max = (bp->origmissings < bp->n) ? bp->origmissings : bp->n; if ( bp->numissued < bp->n )
if ( bp->missingstime == 0 || bp->numissued < bp->n || (bp == coin->current && missing < (max >> 1)) || missing < (max >> 3) || time(NULL) > bp->missingstime+lag ) max = bp->numissued;
else max = bp->origmissings;
if ( bp->missingstime == 0 || bp->numissued < bp->n || (bp == coin->current && missing < (max >> 2)) || missing < (max >> 4) || time(NULL) > bp->missingstime+lag )
{ {
if ( (n= iguana_bundlerequests(coin,missings,&bp->origmissings,&tmp,bp,lag)) > 0 ) if ( (n= iguana_bundlerequests(coin,missings,&bp->origmissings,&tmp,bp,lag)) > 0 )
{ {

Loading…
Cancel
Save