Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
8acc396707
  1. 2
      iguana/iguana777.h
  2. 4
      iguana/iguana_bundles.c
  3. 5
      iguana/iguana_rpc.c

2
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_SERIALIZE_SPENDVECTORGEN
//#define IGUANA_DISABLEPEERS //#define IGUANA_DISABLEPEERS
#define _IGUANA_MAXSTUCKTIME 10 #define _IGUANA_MAXSTUCKTIME 10
#define IGUANA_MAXITERATIONS 10000 #define IGUANA_MAXITERATIONS 3333
#define IGUANA_DEFAULTLAG 30 #define IGUANA_DEFAULTLAG 30
#define IGUANA_MAXCOINS 64 #define IGUANA_MAXCOINS 64

4
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 ) 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->stucktime = (uint32_t)time(NULL);
coin->stuckiters = 0; 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); 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("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) ) if ( coin->isRT != 0 || (firstgap != 0 && firstgap->hdrsi == coin->bundlescount-1) )
coin->stucktime = coin->stuckiters = 0; coin->stucktime = coin->stuckiters = 0;

5
iguana/iguana_rpc.c

@ -652,10 +652,11 @@ char *iguana_bitcoinRPC(struct supernet_info *myinfo,char *method,cJSON *json,ch
} }
else if ( n > 0 ) else if ( n > 0 )
{ {
printf("n.%d (%s)\n",n,jstr(array,0));
for (i=n-1; i>=0; i--) for (i=n-1; i>=0; i--)
{ {
params[i] = cJSON_DetachItemFromArray(array,i);//; 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); 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); retstr = iguana_bitcoinrpc(myinfo,port,coin,method,params,n,json,remoteaddr,array);

Loading…
Cancel
Save