From 8de61127855a15c46d9e8adc7c931ce8cb81d041 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 5 Apr 2016 19:30:47 -0500 Subject: [PATCH] test --- iguana/iguana777.h | 2 +- iguana/iguana_bundles.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/iguana/iguana777.h b/iguana/iguana777.h index 164ed79aa..a66d114d4 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -27,7 +27,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t //#define IGUANA_DISABLEPEERS #define _IGUANA_MAXSTUCKTIME 10 #define IGUANA_MAXITERATIONS 2000 -#define IGUANA_DEFAULTLAG 30 +#define IGUANA_DEFAULTLAG 20 #define IGUANA_MAXCOINS 64 #define IGUANA_MAXDELAY_MILLIS (3600 * 1000) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index a40607dfa..23c436a3f 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -465,6 +465,8 @@ int32_t iguana_blocksmissing(struct iguana_info *coin,int32_t *nonzp,uint8_t mis else aveduration = IGUANA_DEFAULTLAG/3 + 1; aveduration *= mult; lag = aveduration; + if ( lag > IGUANA_DEFAULTLAG ) + lag = IGUANA_DEFAULTLAG * 8; memset(missings,0,IGUANA_MAXBUNDLESIZE/8+1); if ( bp->emitfinish == 0 ) { @@ -1185,7 +1187,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag) if ( bp->durationscount != 0 ) aveduration = (double)bp->totaldurations / bp->durationscount; else aveduration = IGUANA_DEFAULTLAG/3 + 1; - if ( (n= iguana_bundlerequests(coin,missings,&tmp,&tmp2,mult,bp,priority)) > 0 ) + if ( (n= iguana_bundlerequests(coin,missings,&tmp,&tmp2,1.,bp,priority)) > 0 ) printf("issued %d priority requests [%d] to unstick stuckiters.%d lag.%d\n",n,bp->hdrsi,coin->stuckiters,lag); //else printf("no bundlerequests issued\n"); }