From 6c83a446520667bf999edbd2b8d2daeefbb90ee6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 10 Mar 2016 19:13:08 -0300 Subject: [PATCH] test --- iguana/iguana777.h | 4 ++-- iguana/iguana_ramchain.c | 2 +- iguana/iguana_recv.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/iguana/iguana777.h b/iguana/iguana777.h index 7eabdb805..2e1d30c42 100755 --- a/iguana/iguana777.h +++ b/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) diff --git a/iguana/iguana_ramchain.c b/iguana/iguana_ramchain.c index dd0a8b56b..956f77c46 100755 --- a/iguana/iguana_ramchain.c +++ b/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); } diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index e1c311b92..29739c01e 100755 --- a/iguana/iguana_recv.c +++ b/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; hdrsipeers.numranked&&coin->current->hdrsi+hdrsibundlescount; 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; bundlein; 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);