From 361d5fb575c198546c6ed52b2da8ea29ac258153 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Sep 2016 03:38:15 -0300 Subject: [PATCH] test --- iguana/iguana_bundles.c | 6 +++--- includes/iguana_defines.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index e12200b50..997da9428 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -621,7 +621,7 @@ int32_t iguana_bundleissuemissing(struct iguana_info *coin,struct iguana_bundle if ( bp->hdrsi < starti || bp->hdrsi > lasti || bp->emitfinish != 0 || ((priority > 0 || bp == coin->current) && time(NULL) < bp->missingstime+3) ) return(0); bp->missingstime = (uint32_t)time(NULL); - if ( bp->durationscount != 0 ) + if ( bp->durationscount > 10 ) { aveduration = (double)bp->totaldurations / bp->durationscount; if ( (rand() % 10000) == 0 ) @@ -666,7 +666,7 @@ int32_t iguana_bundleissuemissing(struct iguana_info *coin,struct iguana_bundle iguana_bundleblock(coin,&hash2,bp,i); if ( bits256_nonz(hash2) != 0 ) { - if ( (priority > 2 || bp->numsaved > bp->n-10) && (addr= coin->peers->ranked[rand() % max]) != 0 && addr->usock >= 0 && addr->dead == 0 ) + if ( (addr= coin->peers->ranked[rand() % max]) != 0 && addr->usock >= 0 && addr->dead == 0 ) { if ( 0 && bp == coin->current ) printf("iguana_bundleissuemissing.[%d:%d]\n",bp->hdrsi,i); @@ -1120,7 +1120,7 @@ int32_t iguana_bundleiters(struct supernet_info *myinfo,struct iguana_info *coin else if ( bp->hdrsi == starti || (bp->hdrsi >= starti && bp->hdrsi <= starti+range) ) { max = bp->n; - counter = iguana_bundleissuemissing(coin,bp,1,3.); + counter = iguana_bundleissuemissing(coin,bp,1,1.); //if ( 0 && counter > 0 ) printf("starti.%d range.%d now.%u spec.%-4d bundle.%-4d h.%-4d r.%-4d s.%-4d F.%d T.%d issued.%d mb.%d/%d\n",starti,range,(uint32_t)time(NULL),bp->numspec,bp->bundleheight/coin->chain->bundlesize,bp->numhashes,bp->numrecv,bp->numsaved,bp->emitfinish,timelimit,counter,coin->MAXBUNDLES,coin->bundlescount); } else bp->nexttime++; diff --git a/includes/iguana_defines.h b/includes/iguana_defines.h index 7c7e7ed4d..1679c1f96 100755 --- a/includes/iguana_defines.h +++ b/includes/iguana_defines.h @@ -27,7 +27,7 @@ #else #define IGUANA_MAXITERATIONS 7777 #endif -#define IGUANA_DEFAULTLAG 30 +#define IGUANA_DEFAULTLAG 7 #define IGUANA_MAXHEIGHT (1 << 30) #define IGUANA_MAXCOINS 64