Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
fb77ab0744
  1. 2
      iguana/iguana_bundles.c
  2. 4
      iguana/iguana_recv.c

2
iguana/iguana_bundles.c

@ -490,7 +490,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str)
tmp = (difft.millis * 1000000);
tmp %= 1000000000;
difft.millis = ((double)tmp / 1000000.);
sprintf(str,"N[%d] Q.%d h.%d r.%d c.%d:%d:%d s.%d d.%d E.%d:%d M.%d L.%d est.%d %s %d:%02d:%02d %03.3f peers.%d/%d Q.(%d %d)",count,coin->numbundlesQ,numhashes,coin->blocksrecv,coin->numcached,numcached,coin->cachefreed,numsaved,done,numemit,coin->numreqsent,coin->blocks.hwmchain.height,coin->longestchain,coin->MAXBUNDLES,mbstr(str2,estsize),(int32_t)difft.x/3600,(int32_t)(difft.x/60)%60,(int32_t)difft.x%60,difft.millis,p,coin->MAXPEERS,queue_size(&coin->priorityQ),queue_size(&coin->blocksQ));
sprintf(str,"1st.%d N[%d] Q.%d h.%d r.%d c.%d:%d:%d s.%d d.%d E.%d:%d M.%d L.%d est.%d %s %d:%02d:%02d %03.3f peers.%d/%d Q.(%d %d)",firstgap!=0?firstgap->hdrsi:0,count,coin->numbundlesQ,numhashes,coin->blocksrecv,coin->numcached,numcached,coin->cachefreed,numsaved,done,numemit,coin->numreqsent,coin->blocks.hwmchain.height,coin->longestchain,coin->MAXBUNDLES,mbstr(str2,estsize),(int32_t)difft.x/3600,(int32_t)(difft.x/60)%60,(int32_t)difft.x%60,difft.millis,p,coin->MAXPEERS,queue_size(&coin->priorityQ),queue_size(&coin->blocksQ));
//sprintf(str+strlen(str),"%s.%-2d %s time %.2f files.%d Q.%d %d\n",coin->symbol,flag,str,(double)(time(NULL)-coin->starttime)/60.,coin->peers.numfiles,queue_size(&coin->priorityQ),queue_size(&coin->blocksQ));
if ( time(NULL) > lastdisp+10 )
{

4
iguana/iguana_recv.c

@ -377,7 +377,7 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int
iguana_bundleQ(coin,bp,((bp->rank != 0) ? bp->rank : 64) * 100);
return(0);
}
else if ( 0 )
else if ( 1 )
{
for (i=0; i<bp->n; i++)
{
@ -948,7 +948,7 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr)
priority = 1;
if ( (req= queue_dequeue(&coin->priorityQ,0)) == 0 )
{
if ( (rand() & 1) == 0 )
if ( (rand() % 7) == 0 )
flag = iguana_neargap(coin,addr);
else if ( (bp= addr->bp) != 0 && bp->rank != 0 && addr->pendblocks < limit )
{

Loading…
Cancel
Save