Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
36430f4c73
  1. 4
      iguana/iguana777.h
  2. 4
      iguana/iguana_bundles.c

4
iguana/iguana777.h

@ -26,7 +26,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t
#define IGUANA_SERIALIZE_SPENDVECTORGEN
//#define IGUANA_SERIALIZE_BALANCEGEN
//#define IGUANA_DISABLEPEERS
#define _IGUANA_MAXSTUCKTIME 77
#define _IGUANA_MAXSTUCKTIME 120
#define IGUANA_MAXITERATIONS 10000
#define IGUANA_DEFAULTLAG 30
@ -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 7
#define IGUANA_MAXPENDINGREQUESTS 3
#define IGUANA_PENDINGREQUESTS 64
#define IGUANA_MINPENDBUNDLES 2
#define IGUANA_MAXPENDBUNDLES 128

4
iguana/iguana_bundles.c

@ -810,7 +810,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
while ( (breq= queue_dequeue(&coin->priorityQ,0)) != 0 )
myfree(breq,sizeof(*breq));
}
n = iguana_blocksmissing(coin,&avail,missings,0,bp,bp->n,30);
n = iguana_blocksmissing(coin,&avail,missings,0,bp,bp->n,3);
printf("issued %d priority requests [%d] to unstick stuckiters.%d lag.%d\n",n,bp->hdrsi,coin->stuckiters,lag);
/*for (i=n=0; i<bp->n; i++)
{
@ -919,7 +919,7 @@ int32_t iguana_bundlemissings(struct iguana_info *coin,struct iguana_bundle *bp,
else aveduplicates = 3 * aveduration;
if ( (rand() % 1000) == 0 )
printf("priority.%d [%d] dist.%d durations %.2f vs %.2f counts[%d %d] \n",priority,bp->hdrsi,dist,aveduration,aveduplicates,(int32_t)bp->durationscount,bp->duplicatescount);
lag = 5 * aveduration;
lag = 3 * aveduration;
}
//if ( bp->missingstime == 0 || bp->numissued < bp->n )//|| (bp == coin->current && time(NULL) > bp->missingstime+lag) ) //
{

Loading…
Cancel
Save