diff --git a/iguana/iguana777.h b/iguana/iguana777.h index 37b655317..164ca5439 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -42,7 +42,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t #define IGUANA_HEADPERCENTAGE 0. #define IGUANA_TAILPERCENTAGE 1.0 #define IGUANA_MAXPENDHDRS 1 -#define IGUANA_MAXPENDINGREQUESTS 32 +#define IGUANA_MAXPENDINGREQUESTS 128 #define IGUANA_PENDINGREQUESTS 512 #define IGUANA_MINPENDBUNDLES 2 #define IGUANA_MAXPENDBUNDLES 64 diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index ba3bc4344..72cc44978 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -610,7 +610,7 @@ int32_t iguana_setmaxbundles(struct iguana_info *coin) double completed; if ( coin->current != 0 && coin->bundlescount != 0 ) { - completed = cbrt(((double)coin->current->hdrsi + 1) / coin->bundlescount); + completed = sqrt(((double)coin->current->hdrsi + 1) / coin->bundlescount); coin->MAXBUNDLES = (double)(coin->endPEND - coin->startPEND)*completed + coin->startPEND; //printf("MAXBUNDLES %d (%d -> %d) completed %.3f\n",coin->MAXBUNDLES,coin->startPEND,coin->endPEND,completed); } @@ -791,9 +791,9 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru if ( coin->stucktime != 0 ) { lag = (int32_t)time(NULL)-coin->stucktime; - if ( ((lag/coin->MAXSTUCKTIME)>>1) > coin->stuckiters ) + if ( (lag/coin->MAXSTUCKTIME) > coin->stuckiters ) { - coin->stuckiters = (int32_t)lag/60; + coin->stuckiters = (int32_t)(lag/coin->MAXSTUCKTIME); if ( 0 && lag > coin->MAXSTUCKTIME ) { while ( (breq= queue_dequeue(&coin->blocksQ,0)) != 0 ) @@ -890,7 +890,7 @@ int32_t iguana_bundlemissings(struct iguana_info *coin,struct iguana_bundle *bp, if ( bp->numissued < bp->n ) max = bp->numissued; else max = bp->origmissings; - if ( bp->missingstime == 0 || bp->numissued < bp->n || (bp == coin->current && time(NULL) > bp->missingstime+lag) ) // + if ( bp->missingstime == 0 || bp->numissued < bp->n )//|| (bp == coin->current && time(NULL) > bp->missingstime+lag) ) // { if ( (n= iguana_bundlerequests(coin,missings,&bp->origmissings,&tmp,bp,lag)) > 0 ) {