Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
3d56ca9c01
  1. 6
      iguana/iguana777.h
  2. 6
      iguana/iguana_recv.c

6
iguana/iguana777.h

@ -37,9 +37,9 @@ 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_MAXPENDING 16
#define IGUANA_MINPENDBUNDLES 128
#define IGUANA_MAXPENDBUNDLES 200
#define _IGUANA_MAXPENDING 3
#define IGUANA_MINPENDBUNDLES 32
#define IGUANA_MAXPENDBUNDLES 32
#define IGUANA_BUNDLELOOP 10000
#define IGUANA_RPCPORT 7778
#define IGUANA_MAXRAMCHAINSIZE ((uint64_t)1024L * 1024L * 1024L * 16)

6
iguana/iguana_recv.c

@ -452,7 +452,7 @@ int32_t iguana_bundlekick(struct iguana_info *coin,struct iguana_bundle *bp,int3
int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int32_t timelimit)
{
int32_t i,range,starti,numhashes,issued,valid,max,counter = 0; struct iguana_block *block; double endmillis,width; struct iguana_bundle *prevbp; uint32_t starttime;
int32_t i,r,range,starti,numhashes,issued,valid,max,counter = 0; struct iguana_block *block; double endmillis,width; struct iguana_bundle *prevbp; uint32_t starttime;
if ( (range= coin->peers.numranked) > coin->MAXBUNDLES )
range = coin->MAXBUNDLES;
starti = coin->current == 0 ? 0 : coin->current->hdrsi;
@ -571,7 +571,9 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int
issued = 0;
max = 100 + (bp->n/coin->MAXBUNDLES)*(bp->hdrsi - starti);
iguana_bundlekick(coin,bp,starti,max);
iguana_bundlekick(coin,coin->current,starti,bp->n);
r = (rand() % 8);
if ( starti+r < coin->bundlescount && coin->bundles[starti+r] != 0 )
iguana_bundlekick(coin,coin->bundles[starti+r],starti+r,coin->bundles[starti+r]->n);
endmillis = OS_milliseconds() + timelimit + (rand() % 1000);
if ( bp->numsaved < bp->n )
width = 100 + max*100;//sqrt(sqrt(bp->n * (1+bp->numsaved+issued)) * (10+coin->bundlescount-bp->hdrsi));

Loading…
Cancel
Save