Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
cab1e10fb3
  1. 2
      iguana/iguana777.h
  2. 4
      iguana/iguana_bundles.c
  3. 2
      iguana/iguana_recv.c

2
iguana/iguana777.h

@ -26,7 +26,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t
#define IGUANA_SERIALIZE_SPENDVECTORGEN #define IGUANA_SERIALIZE_SPENDVECTORGEN
//#define IGUANA_DISABLEPEERS //#define IGUANA_DISABLEPEERS
#define _IGUANA_MAXSTUCKTIME 10 #define _IGUANA_MAXSTUCKTIME 10
#define IGUANA_MAXITERATIONS 10000 #define IGUANA_MAXITERATIONS 100
#define IGUANA_DEFAULTLAG 20 #define IGUANA_DEFAULTLAG 20
#define IGUANA_MAXCOINS 64 #define IGUANA_MAXCOINS 64

4
iguana/iguana_bundles.c

@ -1200,6 +1200,10 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag)
if ( coin->stucktime != 0 && time(NULL)-coin->stucktime > coin->maxstuck ) if ( coin->stucktime != 0 && time(NULL)-coin->stucktime > coin->maxstuck )
coin->maxstuck = (uint32_t)time(NULL) - coin->stucktime; coin->maxstuck = (uint32_t)time(NULL) - coin->stucktime;
sprintf(str,"%s.RT%d u.%d b.%d/%d v.%d/%d (%d+%d/%d 1st.%d).s%d to %d N[%d] h.%d r.%d c.%d 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,numconverted,numv,coin->pendbalances,firstgap!=0?firstgap->numcached:-1,firstgap!=0?firstgap->numsaved:-1,firstgap!=0?firstgap->numhashes:-1,firstgap!=0?firstgap->hdrsi:-1,firstgap!=0?firstgap->numspec:-1,coin->lastpending!=0?coin->lastpending->hdrsi:0,count,numhashes,coin->blocksrecv,numcached,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)); sprintf(str,"%s.RT%d u.%d b.%d/%d v.%d/%d (%d+%d/%d 1st.%d).s%d to %d N[%d] h.%d r.%d c.%d 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,numconverted,numv,coin->pendbalances,firstgap!=0?firstgap->numcached:-1,firstgap!=0?firstgap->numsaved:-1,firstgap!=0?firstgap->numhashes:-1,firstgap!=0?firstgap->hdrsi:-1,firstgap!=0?firstgap->numspec:-1,coin->lastpending!=0?coin->lastpending->hdrsi:0,count,numhashes,coin->blocksrecv,numcached,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));
if ( coin->current != 0 && coin->current->hdrsi == coin->longestchain/coin->chain->bundlesize && done+numemit < coin->current->hdrsi )
{
printf("missing bundles d.%d + E.%d != %d\n",done,numemit,coin->current->hdrsi);
}
// u.202 b.0/202 v.202/202 // u.202 b.0/202 v.202/202
if ( coin->current != 0 && numutxo == coin->bundlescount-1 && numutxo == coin->current->hdrsi && numbalances == 0 && numconverted == numutxo ) if ( coin->current != 0 && numutxo == coin->bundlescount-1 && numutxo == coin->current->hdrsi && numbalances == 0 && numconverted == numutxo )
{ {

2
iguana/iguana_recv.c

@ -1267,7 +1267,7 @@ int32_t iguana_blockQ(char *argstr,struct iguana_info *coin,struct iguana_bundle
queue_t *Q; char *str; uint32_t now; int32_t n,height = -1; struct iguana_blockreq *req,*ptr; struct iguana_block *block = 0; queue_t *Q; char *str; uint32_t now; int32_t n,height = -1; struct iguana_blockreq *req,*ptr; struct iguana_block *block = 0;
if ( bits256_nonz(hash2) == 0 ) if ( bits256_nonz(hash2) == 0 )
{ {
printf("cant queue zerohash bundlei.%d\n",bundlei); printf("%s.cant queue zerohash bundlei.%d\n",argstr,bundlei);
//getchar(); //getchar();
return(-1); return(-1);
} }

Loading…
Cancel
Save