Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
99ee574b82
  1. 2
      iguana/iguana777.h
  2. 3
      iguana/iguana_bundles.c

2
iguana/iguana777.h

@ -435,7 +435,7 @@ struct iguana_bundle
struct queueitem DL; struct iguana_info *coin; struct iguana_bundle *nextbp;
struct iguana_bloom16 bloom; //uint32_t rawscriptspace;
uint32_t issuetime,hdrtime,emitfinish,mergefinish,purgetime,queued,startutxo,utxofinish,balancefinish,validated,lastspeculative,dirty,nexttime,currenttime,lastprefetch,missingstime;
int32_t numhashes,numrecv,numsaved,numcached,generrs,currentflag,origmissings;
int32_t numhashes,numrecv,numsaved,numcached,generrs,currentflag,origmissings,numissued;
int32_t minrequests,n,hdrsi,bundleheight,numtxids,numspends,numunspents,numspec,isRT;
double avetime,threshold,metric; uint64_t datasize,estsize;
struct iguana_block *blocks[IGUANA_MAXBUNDLESIZE];

3
iguana/iguana_bundles.c

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

Loading…
Cancel
Save