Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
d753d7e2cd
  1. 2
      iguana/iguana777.h
  2. 8
      iguana/iguana_bundles.c

2
iguana/iguana777.h

@ -27,7 +27,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t
//#define IGUANA_DISABLEPEERS
#define _IGUANA_MAXSTUCKTIME 10
#define IGUANA_MAXITERATIONS 10000
#define IGUANA_DEFAULTLAG 20
#define IGUANA_DEFAULTLAG 30
#define IGUANA_MAXCOINS 64
#define IGUANA_MAXDELAY_MILLIS (3600 * 1000)

8
iguana/iguana_bundles.c

@ -780,7 +780,7 @@ int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp,int
{
//if ( bp->minrequests == 0 || (block->numrequests > 0 && block->numrequests < bp->minrequests) )
// bp->minrequests = block->numrequests;
if ( block->txvalid != 0 && block->fpipbits != 0 && block->fpos >= 0 && (bp->bundleheight+bundlei == 0 || bits256_nonz(block->RO.prev_block) != 0) )
if ( block->fpipbits != 0 )//&& block->txvalid != 0 && block->fpos >= 0 && (bp->bundleheight+bundlei == 0 || bits256_nonz(block->RO.prev_block) != 0) )
numsaved++;
if ( block->RO.recvlen != 0 )
{
@ -1018,8 +1018,8 @@ double iguana_bundlemissings(struct iguana_info *coin,struct iguana_bundle *bp,d
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);
}
if ( aveduration != 0. )
mult = ((bp == coin->current) ? (strcmp("BTC",coin->symbol) != 0 ? 1. : 3) : 7.);
else mult = 5.;
mult = ((bp == coin->current) ? (strcmp("BTC",coin->symbol) != 0 ? 2. : 5) : 7.);
else mult = 7.;
/*if ( mult > 2 && bp->numcached > .95*bp->n )
{
if ( bp->numcached > .99*bp->n )
@ -1249,7 +1249,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag)
if ( bp->durationscount != 0 )
aveduration = (double)bp->totaldurations / bp->durationscount;
else aveduration = IGUANA_DEFAULTLAG/3 + 1;
if ( (n= iguana_bundlerequests(coin,missings,&tmp,&tmp2,3.,bp,priority)) > 0 )
if ( (n= iguana_bundlerequests(coin,missings,&tmp,&tmp2,2.,bp,priority)) > 0 )
printf("issued %d priority requests [%d] to unstick stuckiters.%d lag.%d\n",n,bp->hdrsi,coin->stuckiters,lag);
//else printf("no bundlerequests issued\n");
}

Loading…
Cancel
Save