Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
38b2cde65d
  1. 2
      iguana/iguana777.h
  2. 2
      iguana/iguana_unspents.c

2
iguana/iguana777.h

@ -43,7 +43,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t
#define IGUANA_TAILPERCENTAGE 1.0
#define IGUANA_MAXPENDHDRS 1
#define IGUANA_MAXPENDINGREQUESTS 2
#define IGUANA_PENDINGREQUESTS 32
#define IGUANA_PENDINGREQUESTS 64
#define IGUANA_MINPENDBUNDLES 2
#define IGUANA_MAXPENDBUNDLES 128
#define IGUANA_BUNDLELOOP 77

2
iguana/iguana_unspents.c

@ -462,7 +462,7 @@ struct iguana_bundle *iguana_externalspent(struct iguana_info *coin,bits256 *pre
iguana_ramchain_prefetch(coin,&spentbp->ramchain);
spentbp->lastprefetch = (uint32_t)time(NULL);
}
else if ( (duration > 1 || duration > (10 * coin->txidfind_totalmillis)/coin->txidfind_num) && time(NULL) > spentbp->lastprefetch+coin->PREFETCHLAG )
else if ( duration > 1 && duration > (10 * coin->txidfind_totalmillis)/coin->txidfind_num && time(NULL) > spentbp->lastprefetch+coin->PREFETCHLAG && (rand() % 10) == 0 )
{
printf("slow txidfind %.2f vs %.2f prefetch[%d] from.[%d] lag.%ld last.%u\n",duration,coin->txidfind_totalmillis/coin->txidfind_num,spentbp->hdrsi,ramchain->H.data->height/coin->chain->bundlesize,time(NULL) - spentbp->lastprefetch,spentbp->lastprefetch);
iguana_ramchain_prefetch(coin,&spentbp->ramchain);

Loading…
Cancel
Save