From 8acc3967071e5e23f193409d0041bc9faa430422 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 7 Apr 2016 14:54:16 -0500 Subject: [PATCH] test --- iguana/iguana777.h | 2 +- iguana/iguana_bundles.c | 4 ++-- iguana/iguana_rpc.c | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/iguana/iguana777.h b/iguana/iguana777.h index 7be3b6e37..aec7788cd 100755 --- a/iguana/iguana777.h +++ b/iguana/iguana777.h @@ -26,7 +26,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t #define IGUANA_SERIALIZE_SPENDVECTORGEN //#define IGUANA_DISABLEPEERS #define _IGUANA_MAXSTUCKTIME 10 -#define IGUANA_MAXITERATIONS 10000 +#define IGUANA_MAXITERATIONS 3333 #define IGUANA_DEFAULTLAG 30 #define IGUANA_MAXCOINS 64 diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index 6c345088d..1661b0044 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -1215,7 +1215,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag) { if ( coin->stuckmonitor != (firstgap->hdrsi * coin->chain->bundlesize * 10) + firstgap->numsaved + firstgap->numhashes + firstgap->numcached ) { - coin->stuckmonitor = (firstgap->hdrsi * coin->chain->bundlesize * 10) + firstgap->numsaved + firstgap->numhashes + firstgap->numcached; + coin->stuckmonitor = (firstgap->hdrsi * 10000) + firstgap->numsaved + firstgap->numhashes + firstgap->numcached; coin->stucktime = (uint32_t)time(NULL); coin->stuckiters = 0; } @@ -1249,7 +1249,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag) 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"); } - } else printf("stuck metric.%d\n",(firstgap->hdrsi * coin->chain->bundlesize * 10) + firstgap->numsaved + firstgap->numhashes + firstgap->numcached); + } //else printf("stuck metric.%d\n",(firstgap->hdrsi * coin->chain->bundlesize * 10) + firstgap->numsaved + firstgap->numhashes + firstgap->numcached); } if ( coin->isRT != 0 || (firstgap != 0 && firstgap->hdrsi == coin->bundlescount-1) ) coin->stucktime = coin->stuckiters = 0; diff --git a/iguana/iguana_rpc.c b/iguana/iguana_rpc.c index 2afc31a87..69a0b6df9 100755 --- a/iguana/iguana_rpc.c +++ b/iguana/iguana_rpc.c @@ -652,10 +652,11 @@ char *iguana_bitcoinRPC(struct supernet_info *myinfo,char *method,cJSON *json,ch } else if ( n > 0 ) { + printf("n.%d (%s)\n",n,jstr(array,0)); for (i=n-1; i>=0; i--) { - params[i] = cJSON_DetachItemFromArray(array,i);//; - //printf("add params[%d] of %d <- (%s) %p.(%p %p)\n",i,n,jprint(params[i],0),params[i],params[i]->next,params[i]->prev); + params[i] = jduplicate(jitem(array,i));//; + printf("add params[%d] of %d <- (%s) %p.(%p %p)\n",i,n,jprint(params[i],0),params[i],params[i]->next,params[i]->prev); } } retstr = iguana_bitcoinrpc(myinfo,port,coin,method,params,n,json,remoteaddr,array);