Browse Source

test

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

4
iguana/iguana777.h

@ -35,9 +35,9 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t
#define IGUANA_HEADPERCENTAGE .00777
#define IGUANA_TAILPERCENTAGE .777
#define IGUANA_MAXPENDHDRS 1
#define _IGUANA_MAXPENDING 64
#define _IGUANA_MAXPENDING 128
#define _IGUANA_MAXBUNDLES 8
#define IGUANA_BUNDLELOOP 3
#define IGUANA_BUNDLELOOP 13
#define IGUANA_RPCPORT 7778
#define IGUANA_MAXRAMCHAINSIZE ((uint64_t)1024L * 1024L * 1024L * 16)

2
iguana/iguana_ramchain.c

@ -2205,7 +2205,7 @@ long iguana_ramchain_data(struct iguana_info *coin,struct iguana_peer *addr,stru
{
static int32_t numredundant; static double redundantsize; char str[65],str2[65];
numredundant++, redundantsize += recvlen;
if ( (rand() % 1000) == 0 )
//if ( (rand() % 1000) == 0 )
printf("ramchaindata have %d:%d at %d | %d blocks %s redundant xfers total %s %.2f%% wasted\n",bp->hdrsi,bundlei,block->fpos,numredundant,mbstr(str,redundantsize),mbstr(str2,totalrecv),100.*redundantsize/totalrecv);
return(block->fpos);
}

6
iguana/iguana_recv.c

@ -1031,12 +1031,12 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr)
int32_t iguana_reqblocks(struct iguana_info *coin)
{
int32_t hdrsi,lflag,n,bundlei,flag = 0; bits256 hash2; struct iguana_block *next,*block; struct iguana_bundle *bp;
if ( queue_size(&coin->priorityQ) == 0 && (bp= coin->current) != 0 && bp->numsaved < bp->n )
if ( (bp= coin->current) != 0 && bp->numsaved < bp->n ) // queue_size(&coin->priorityQ) == 0 &&
{
for (hdrsi=0; hdrsi<coin->peers.numranked&&coin->current->hdrsi+hdrsi<coin->bundlescount; hdrsi++)
{
if ( (bp= coin->bundles[hdrsi + coin->current->hdrsi]) == 0 )
break;
continue;
if ( coin->peers.ranked[hdrsi] == 0 || coin->peers.ranked[hdrsi]->msgcounts.verack == 0 )
continue;
for (bundlei=n=flag=0; bundlei<bp->n; bundlei++)
@ -1044,7 +1044,7 @@ int32_t iguana_reqblocks(struct iguana_info *coin)
{
if ( bits256_nonz(block->RO.hash2) > 0 && block->fpipbits != 0 )
n++;
else if ( bp->numsaved > bp->n*.9 && time(NULL) > block->issued+13 )
else if ( time(NULL) > block->issued+13 ) //bp->numsaved > bp->n*.9 &&
{
char str[65];
//printf("%d ",bundlei);

Loading…
Cancel
Save