Browse Source

test

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

2
iguana/iguana777.h

@ -465,7 +465,7 @@ struct iguana_info
int64_t mining,totalfees,TMPallocated,MAXRECVCACHE,MAXMEM,estsize,activebundles;
int32_t MAXPEERS,MAXPENDING,MAXBUNDLES,MAXSTUCKTIME,active,closestbundle,numemitted,lastsweep,startutc,newramchain,numcached,cachefreed,helperdepth,startPEND,endPEND,enableCACHE,RELAYNODE,VALIDATENODE,balanceswritten,RTheight; bits256 balancehash;
uint32_t lastsync,parsetime,numiAddrs,lastpossible,bundlescount,savedblocks,backlog;
int32_t longestchain,badlongestchain,longestchain_strange,RTramchain_busy,emitbusy;
int32_t longestchain,badlongestchain,longestchain_strange,RTramchain_busy,emitbusy,stuckiters;
struct tai starttime; double startmillis;
struct iguana_chain *chain;
struct iguana_iAddr *iAddrs;

8
iguana/iguana_bundles.c

@ -932,8 +932,9 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
if ( coin->stucktime != 0 )
{
lag = time(NULL)-coin->stucktime;
if ( (lag % 60) == 30 )
if ( lag/60 > coin->stuckiters )
{
coin->stuckiters = (int32_t)lag/60;
while ( (breq= queue_dequeue(&coin->blocksQ,0)) != 0 )
myfree(breq,sizeof(*breq));
while ( (breq= queue_dequeue(&coin->priorityQ,0)) != 0 )
@ -955,7 +956,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct OS_memspace *mem,stru
n++;
}
}
printf("issued %d priority requests [%d] to unstick\n",n,bp->hdrsi);
printf("issued %d priority requests [%d] to unstick stuckiters.%d lag.%ld\n",n,bp->hdrsi,coin->stuckiters,lag);
}
}
}
@ -1147,10 +1148,11 @@ void iguana_bundlestats(struct iguana_info *coin,char *str)
{
coin->stuckmonitor = (firstgap->hdrsi * coin->chain->bundlesize) + firstgap->numsaved;
coin->stucktime = (uint32_t)time(NULL);
coin->stuckiters = 0;
}
}
if ( coin->isRT != 0 || (firstgap != 0 && firstgap->hdrsi == coin->bundlescount-1) )
coin->stucktime = 0;
coin->stucktime = coin->stuckiters = 0;
if ( coin->stucktime != 0 && time(NULL)-coin->stucktime > coin->maxstuck )
coin->maxstuck = (uint32_t)time(NULL) - coin->stucktime;
sprintf(str,"%s.RT%d u.%d b.%d v.%d/%d (%d/%d 1st.%d) to %d N[%d] h.%d r.%d c.%s s.%d d.%d E.%d maxB.%d peers.%d/%d Q.(%d %d) L.%d [%d:%d] M.%d %s",coin->symbol,coin->RTheight,numutxo,numbalances,numv,coin->pendbalances,firstgap!=0?firstgap->numsaved:-1,firstgap!=0?firstgap->numhashes:-1,firstgap!=0?firstgap->hdrsi:-1,coin->lastpending!=0?coin->lastpending->hdrsi:0,count,numhashes,coin->blocksrecv,mbstr(str4,spaceused),numsaved,done,numemit,coin->MAXBUNDLES,p,coin->MAXPEERS,queue_size(&coin->priorityQ),queue_size(&coin->blocksQ),coin->longestchain,coin->blocks.hwmchain.height/coin->chain->bundlesize,coin->blocks.hwmchain.height%coin->chain->bundlesize,coin->blocks.hwmchain.height,bits256_str(str5,coin->blocks.hwmchain.RO.hash2));

4
iguana/main.c

@ -355,7 +355,7 @@ void mainloop(struct supernet_info *myinfo)
for (i=0; i<IGUANA_MAXCOINS; i++)
if ( (coin= Coins[i]) != 0 && coin->current != 0 )
{
printf("main active.%d started.%p\n",coin->active,coin->started);
//printf("main active.%d started.%p\n",coin->active,coin->started);
if ( coin->active != 0 && coin->started != 0 )
{
coin->RTramchain_busy = 1;
@ -392,7 +392,7 @@ void mainloop(struct supernet_info *myinfo)
}
}
coin->RTramchain_busy = (coin->RTgenesis == 0 || queue_size(&balancesQ) != 0);
if ( flag != 0 )
if ( 0 && flag != 0 )
printf("call RT update busy.%d\n",coin->RTramchain_busy);
}
}

Loading…
Cancel
Save