Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
09f2527ab6
  1. 5
      iguana/iguana777.c
  2. 2
      iguana/iguana777.h
  3. 3
      iguana/iguana_unspents.c
  4. 3
      iguana/main.c

5
iguana/iguana777.c

@ -435,7 +435,7 @@ void iguana_helper(void *arg)
void iguana_coinloop(void *arg)
{
struct iguana_info *coin,**coins = arg;
struct iguana_bundle *bp; int32_t flag,i,n,bundlei; bits256 zero; char str[1024];
struct iguana_bundle *bp; int32_t flag,i,n,bundlei; bits256 zero; char str[65];
uint32_t now;
n = (int32_t)(long)coins[0];
coins++;
@ -502,9 +502,6 @@ void iguana_coinloop(void *arg)
//fprintf(stderr,"metrics\n");
coin->peers.lastmetrics = iguana_updatemetrics(coin); // ranks peers
}
//fprintf(stderr,"call stats\n");
iguana_bundlestats(coin,str);
//fprintf(stderr,"call process\n");
flag += iguana_processrecv(coin);
if ( coin->longestchain+10000 > coin->blocks.maxbits )
iguana_recvalloc(coin,coin->longestchain + 100000);

2
iguana/iguana777.h

@ -424,7 +424,7 @@ struct iguana_bundle
{
struct queueitem DL; struct iguana_info *coin; struct iguana_bundle *nextbp;
struct iguana_bloom16 bloom; uint32_t rawscriptspace;
uint32_t issuetime,hdrtime,emitfinish,mergefinish,purgetime,queued,startutxo,utxofinish,balancefinish,validated,lastspeculative,dirty,nexttime,currenttime;
uint32_t issuetime,hdrtime,emitfinish,mergefinish,purgetime,queued,startutxo,utxofinish,balancefinish,validated,lastspeculative,dirty,nexttime,currenttime,lastprefetch;
int32_t numhashes,numrecv,numsaved,numcached,generrs,checkedtmp,currentflag;
int32_t minrequests,n,hdrsi,bundleheight,numtxids,numspends,numunspents,numspec;
double avetime,threshold,metric; uint64_t datasize,estsize;

3
iguana/iguana_unspents.c

@ -455,10 +455,11 @@ int32_t iguana_balancegen(struct iguana_info *coin,struct iguana_bundle *bp,int3
now = (uint32_t)time(NULL);
if ( spentbp != 0 && unspentind > 0 && unspentind < spentbp->ramchain.H.data->numunspents )
{
if ( (bp == spentbp && spentbp->dirty == 0) || (spentbp != bp && (spentbp->dirty % 10000) == 3) )
if ( now > bp->lastprefetch+30 )
{
//printf("current.%d prefetch.[%d]\n",spentbp == bp,spentbp->hdrsi);
iguana_ramchain_prefetch(coin,&spentbp->ramchain);
bp->lastprefetch = now;
}
spentbp->dirty++;
//if ( incremental == 0 )

3
iguana/main.c

@ -438,7 +438,7 @@ int32_t iguana_balanceflush(struct iguana_info *coin,int32_t refhdrsi,int32_t pu
void mainloop(struct supernet_info *myinfo)
{
int32_t i,j,flag; struct iguana_info *coin; struct iguana_helper *ptr; struct iguana_bundle *bp,*prevbp = 0;
int32_t i,j,flag; char str[2048]; struct iguana_info *coin; struct iguana_helper *ptr; struct iguana_bundle *bp,*prevbp = 0;
sleep(3);
printf("mainloop\n");
while ( 1 )
@ -449,6 +449,7 @@ void mainloop(struct supernet_info *myinfo)
for (i=0; i<IGUANA_MAXCOINS; i++)
if ( (coin= Coins[i]) != 0 && coin->active != 0 && (bp= coin->current) != 0 && coin->started != 0 )
{
iguana_bundlestats(coin,str);
iguana_realtime_update(coin);
if ( (ptr= queue_dequeue(&balancesQ,0)) != 0 )
{

Loading…
Cancel
Save