Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
bfd266ba05
  1. 5
      iguana/iguana777.c
  2. 9
      iguana/iguana_bundles.c

5
iguana/iguana777.c

@ -394,16 +394,13 @@ void iguana_coinloop(void *arg)
if ( iguana_updateramchain(coin) != 0 ) if ( iguana_updateramchain(coin) != 0 )
iguana_syncs(coin), flag++; // merge ramchain fragments into full ramchain iguana_syncs(coin), flag++; // merge ramchain fragments into full ramchain
} }
//if ( now > lastdisp+1 )
{
lastdisp = (uint32_t)now; lastdisp = (uint32_t)now;
iguana_bundlestats(coin,str); iguana_bundlestats(coin,str);
if ( str[0] != 0 ) if ( str[0] != 0 )
{ {
if ( (rand() % 30) == 0 ) if ( (rand() % 1000) == 0 )
myallocated(0,0); myallocated(0,0);
} }
}
iguana_ramchainmerge(coin); iguana_ramchainmerge(coin);
} }
}// bp block needs mutex }// bp block needs mutex

9
iguana/iguana_bundles.c

@ -385,7 +385,7 @@ void iguana_bundleiclear(struct iguana_info *coin,struct iguana_bundle *bp,int32
void iguana_bundlestats(struct iguana_info *coin,char *str) void iguana_bundlestats(struct iguana_info *coin,char *str)
{ {
static uint32_t lastdisp; static bits256 zero; static bits256 zero;
int32_t i,n,issued,dispflag,bundlei,lefti,minrequests,missing,numbundles,numdone,numrecv,totalsaved,numhashes,numcached,numsaved,numemit,numactive,firstbundle,totalrecv = 0; struct iguana_peer *addr1; int32_t i,n,issued,dispflag,bundlei,lefti,minrequests,missing,numbundles,numdone,numrecv,totalsaved,numhashes,numcached,numsaved,numemit,numactive,firstbundle,totalrecv = 0; struct iguana_peer *addr1;
bits256 hash2; struct iguana_bundle *bp; struct iguana_block *block; int64_t datasize,estsize = 0; bits256 hash2; struct iguana_bundle *bp; struct iguana_block *block; int64_t datasize,estsize = 0;
//iguana_chainextend(coin,iguana_blockfind(coin,coin->blocks.hwmchain)); //iguana_chainextend(coin,iguana_blockfind(coin,coin->blocks.hwmchain));
@ -541,11 +541,8 @@ void iguana_bundlestats(struct iguana_info *coin,char *str)
difft.millis = ((double)tmp / 1000000.); difft.millis = ((double)tmp / 1000000.);
sprintf(str,"N[%d] d.%d p.%d g.%d A.%d h.%d r.%d c.%d:%d s.%d E.%d:%d M.%d L.%d est.%d %s %d:%02d:%02d %03.3f peers.%d/%d",coin->bundlescount,numdone,coin->numpendings,numbundles,numactive,numhashes,coin->blocksrecv,coin->numcached,coin->cachefreed,totalsaved,coin->numemitted,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); sprintf(str,"N[%d] d.%d p.%d g.%d A.%d h.%d r.%d c.%d:%d s.%d E.%d:%d M.%d L.%d est.%d %s %d:%02d:%02d %03.3f peers.%d/%d",coin->bundlescount,numdone,coin->numpendings,numbundles,numactive,numhashes,coin->blocksrecv,coin->numcached,coin->cachefreed,totalsaved,coin->numemitted,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);
//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)); //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 ( dispflag != 0 && time(NULL) > lastdisp+10 ) if ( (rand() % 100) == 0 )
{ printf("%s\n",str);
printf("%u %s\n",lastdisp,str);
lastdisp = (uint32_t)time(NULL);
}
strcpy(coin->statusstr,str); strcpy(coin->statusstr,str);
coin->activebundles = numactive; coin->activebundles = numactive;
coin->estsize = estsize; coin->estsize = estsize;

Loading…
Cancel
Save