Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
7d883ed2c5
  1. 1
      iguana/iguana777.c
  2. 2
      iguana/iguana777.h
  3. 4
      iguana/iguana_unspents.c

1
iguana/iguana777.c

@ -605,6 +605,7 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers,
mult = (strcmp("BTC",coin->symbol) != 0) ? 512 : 1;
maxval = (strcmp("BTC",coin->symbol) != 0) ? 2048 : 256;
coin->MAXMEM = juint(json,"RAM");
coin->PREFETCHLAG = juint(json,"prefetchlag");
if ( (coin->MAXSTUCKTIME= juint(json,"maxstuck")) == 0 )
coin->MAXSTUCKTIME = _IGUANA_MAXSTUCKTIME;
if ( coin->MAXMEM == 0 )

2
iguana/iguana777.h

@ -468,7 +468,7 @@ struct iguana_info
char name[64],symbol[8],statusstr[512],scriptsfname[2][512];
struct iguana_peers peers; struct iguana_peer internaladdr;
uint64_t instance_nonce,myservices,totalsize,totalrecv,totalpackets,sleeptime;
int64_t mining,totalfees,TMPallocated,MAXRECVCACHE,MAXMEM,estsize,activebundles;
int64_t mining,totalfees,TMPallocated,MAXRECVCACHE,MAXMEM,PREFETCHLAG,estsize,activebundles;
int32_t MAXPEERS,MAXPENDINGREQUESTS,MAXBUNDLES,MAXSTUCKTIME,active,closestbundle,numemitted,lastsweep,startutc,newramchain,numcached,cachefreed,helperdepth,startPEND,endPEND,enableCACHE,RELAYNODE,VALIDATENODE,origbalanceswritten,balanceswritten,RTheight; bits256 balancehash;
uint32_t lastsync,parsetime,numiAddrs,lastpossible,bundlescount,savedblocks,backlog;
int32_t longestchain,badlongestchain,longestchain_strange,RTramchain_busy,emitbusy,stuckiters;

4
iguana/iguana_unspents.c

@ -710,7 +710,7 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp)
}
for (k=0; k<T[txidind].numvins && errs==0; k++,spendind++)
{
if ( (spendind % 100000) == 0 )
if ( (spendind % 1000000) == 0 )
printf("spendvectors elapsed.%-3d [%-3d:%4d] spendind.%d\n",(uint32_t)time(NULL)-starttime,bp->hdrsi,i,spendind);
s = &S[spendind];
u = 0;
@ -724,7 +724,7 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp)
printf("unexpected spendbp: height.%d bp.[%d] U%d <- S%d.[%d] [ext.%d %s prev.%d]\n",bp->bundleheight+i,spentbp->hdrsi,spent_unspentind,spendind,bp->hdrsi,s->external,bits256_str(str,prevhash),s->prevout);
errs++;
}
if ( 1 && now > spentbp->lastprefetch+10 )
if ( coin->PREFETCHLAG != 0 && now > spentbp->lastprefetch+coin->PREFETCHLAG )
{
printf("prefetch[%d] from.[%d] lag.%d\n",spentbp->hdrsi,bp->hdrsi,now - spentbp->lastprefetch);
iguana_ramchain_prefetch(coin,&spentbp->ramchain);

Loading…
Cancel
Save