Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
84061b225f
  1. 2
      iguana/iguana777.c
  2. 4
      iguana/iguana777.h
  3. 12
      iguana/iguana_bundles.c

2
iguana/iguana777.c

@ -570,7 +570,7 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers,
if ( (coin->MAXPENDING= maxpending) <= 0 )
coin->MAXPENDING = (strcmp(symbol,"BTC") == 0) ? _IGUANA_MAXPENDING : 64*_IGUANA_MAXPENDING;
if ( (coin->MAXBUNDLES= maxbundles) <= 0 )
coin->MAXBUNDLES = (strcmp(symbol,"BTC") == 0) ? IGUANA_MAXPENDBUNDLES : IGUANA_MAXPENDBUNDLES * 3;
coin->MAXBUNDLES = (strcmp(symbol,"BTC") == 0) ? IGUANA_MAXPENDBUNDLES : IGUANA_MAXPENDBUNDLES * 64;
coin->myservices = services;
printf("ensure directories\n");
sprintf(dirname,"accounts/%s",symbol), OS_ensure_directory(dirname);

4
iguana/iguana777.h

@ -38,8 +38,8 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t
#define IGUANA_TAILPERCENTAGE 1.0
#define IGUANA_MAXPENDHDRS 1
#define _IGUANA_MAXPENDING 3
#define IGUANA_MINPENDBUNDLES 64
#define IGUANA_MAXPENDBUNDLES 64
#define IGUANA_MINPENDBUNDLES 8
#define IGUANA_MAXPENDBUNDLES 32
#define IGUANA_BUNDLELOOP 77
#define IGUANA_RPCPORT 7778
#define IGUANA_MAXRAMCHAINSIZE ((uint64_t)1024L * 1024L * 1024L * 16)

12
iguana/iguana_bundles.c

@ -478,7 +478,7 @@ int32_t iguana_bundleissue(struct iguana_info *coin,struct iguana_bundle *bp,int
flag++;
counter++;
block->peerid = 0;
iguana_blockQ("kick",coin,bp,j,block->RO.hash2,now > block->issued+lag);
iguana_blockQ("kick",coin,bp,j,block->RO.hash2,now > block->issued+lag*10);
bp->issued[i] = block->issued = now;
}
}
@ -499,7 +499,7 @@ int32_t iguana_bundleissue(struct iguana_info *coin,struct iguana_bundle *bp,int
if ( bp == coin->current )
{
counter++;
iguana_blockQ("kick",coin,bp,i,block->RO.hash2,now > block->issued+lag);
iguana_blockQ("kick",coin,bp,i,block->RO.hash2,now > block->issued+lag*10);
//if ( bp == coin->current && (addr= coin->peers.ranked[rand() % numpeers]) != 0 )
// iguana_sendblockreqPT(coin,addr,bp,i,block->RO.hash2,0);
printf("[%d:%d] ",bp->hdrsi,i);
@ -719,13 +719,13 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int
else if ( bp->hdrsi > starti && bp->hdrsi <= starti+range )
{
max = sqrt(bp->n) - (bp->n/coin->MAXBUNDLES)*(bp->hdrsi - starti);
if ( max > 100 )
max = 100;
if ( max > 500 )
max = 500;
else if ( max < 10 )
max = 10;
counter = iguana_bundleissue(coin,bp,max,timelimit);
if ( 0 && bp->hdrsi == starti )
printf("ITERATE.%d max.%d bundle.%d h.%d n.%d r.%d s.%d F.%d T.%d %f counter.%d\n",bp->rank,max,bp->bundleheight/coin->chain->bundlesize,bp->numhashes,bp->n,bp->numrecv,bp->numsaved,bp->emitfinish,timelimit,endmillis-OS_milliseconds(),counter);
//if ( 0 && bp->hdrsi == starti )
printf("ITERATE.%d max.%d bundle.%d h.%d n.%d r.%d s.%d F.%d T.%d counter.%d\n",bp->rank,max,bp->bundleheight/coin->chain->bundlesize,bp->numhashes,bp->n,bp->numrecv,bp->numsaved,bp->emitfinish,timelimit,counter);
}
bp->nexttime = (uint32_t)time(NULL) + 1;
iguana_bundleQ(coin,bp,1000);

Loading…
Cancel
Save