From 47b66e7c27ae87a0fc5b1334fc74c05f1589ea4e Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 12 Jan 2016 21:48:03 -0300 Subject: [PATCH] test --- iguana/iguana_bundles.c | 4 ++-- iguana/iguana_recv.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index d0795e2d0..b3ff08520 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -439,7 +439,7 @@ int64_t iguana_bundlecalcs(struct iguana_info *coin,struct iguana_bundle *bp) bp->emitfinish = 1; iguana_emitQ(coin,bp); } - else bp->metric = (2*bp->n - bp->numsaved - bp->numrecv);//sqrt((sqrt(fabs(bp->estsize - bp->datasize)) * (bp->n - bp->numsaved)) * (bp->hdrsi + 1)); + else bp->metric = (2*bp->n - bp->numsaved - bp->numrecv) * (bp->hdrsi + 1);//sqrt((sqrt(fabs(bp->estsize - bp->datasize)) * (bp->n - bp->numsaved)) * (bp->hdrsi + 1)); } //printf("%f ",bp->metric); return(bp->estsize); @@ -535,7 +535,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str) } /*for (i=0; irankedbps[i][0],coin->rankedbps[i][1],coin->bundles[(int32_t)coin->rankedbps[i][1]]->numrecv);*/ - if ( 0 && flag != 0 ) + if ( 1 && flag != 0 ) printf("rem.%d issue.%d pend.%d | numranked.%d\n",n,origissue,pend,coin->peers.numranked); } } diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 6ed04b4d6..4022eb880 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -591,8 +591,8 @@ int32_t iguana_reqhdrs(struct iguana_info *coin) if ( (bp= coin->bundles[i]) != 0 && bp->emitfinish < coin->startutc ) { if ( i == coin->bundlescount-1 ) - lag = 5; - else lag = 3 + (rand() % 13); + lag = 60; + else lag = 13 + (rand() % 13); //if ( i < coin->bundlescount-1 && (bp->numhashes >= (rand() % bp->n) || time(NULL) < bp->hdrtime+lag) ) // continue; if ( bp->numhashes < bp->n && bp->bundleheight+bp->numhashes < coin->longestchain && time(NULL) > bp->issuetime+lag )