From 8198834630a03c36603d32c54f61619c61a9b9fb Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 16 Aug 2016 12:46:25 -0300 Subject: [PATCH] test --- iguana/iguana_blocks.c | 3 +-- iguana/iguana_bundles.c | 2 +- iguana/iguana_realtime.c | 2 +- iguana/iguana_volatiles.c | 4 ++-- includes/iguana_defines.h | 2 +- includes/iguana_globals.h | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/iguana/iguana_blocks.c b/iguana/iguana_blocks.c index bb1f59682..6e73d45df 100755 --- a/iguana/iguana_blocks.c +++ b/iguana/iguana_blocks.c @@ -575,10 +575,9 @@ struct iguana_block *_iguana_chainlink(struct iguana_info *coin,struct iguana_bl } else { - char str[65]; if ( bits256_nonz(block->RO.prev_block) != 0 ) { - printf("chainlink error: cant find prev.(%s)\n",bits256_str(str,block->RO.prev_block)); + //printf("chainlink error: cant find prev.(%s)\n",bits256_str(str,block->RO.prev_block)); iguana_blockunmark(coin,block,0,-1,0); //memset(&block->RO.prev_block.bytes,0,sizeof(block->RO.prev_block)); //getchar(); diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index b6a71ac6c..13e16cc60 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -1443,7 +1443,7 @@ void iguana_bundlestats(struct iguana_info *coin,char *str,int32_t lag) coin->stucktime = coin->stuckiters = 0; if ( coin->stucktime != 0 && time(NULL)-coin->stucktime > coin->maxstuck ) coin->maxstuck = (uint32_t)time(NULL) - coin->stucktime; - sprintf(str,"%s.RT%d u.%d+c.%d b.%d v.%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,numconverted,numbalances,iguana_validated(coin),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->longestchain/coin->chain->bundlesize,coin->longestchain%coin->chain->bundlesize,coin->blocks.hwmchain.height,bits256_str(str5,coin->blocks.hwmchain.RO.hash2)); + sprintf(str,"%s.RT%d u.%d+c.%d b.%d v.%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 ledger.%08llx",coin->symbol,coin->RTheight,numutxo,numconverted,numbalances,iguana_validated(coin),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->longestchain/coin->chain->bundlesize,coin->longestchain%coin->chain->bundlesize,coin->blocks.hwmchain.height,bits256_str(str5,coin->blocks.hwmchain.RO.hash2),(long long)coin->utxoaddrhash.txid); //if( strcmp("BTC",coin->symbol) == 0 ) // printf("%s\n",str); if ( coin->current != 0 && coin->current->hdrsi == coin->longestchain/coin->chain->bundlesize && numemit == coin->current->hdrsi && numutxo == coin->bundlescount-1 ) diff --git a/iguana/iguana_realtime.c b/iguana/iguana_realtime.c index 95fb68a47..ccc0cf420 100755 --- a/iguana/iguana_realtime.c +++ b/iguana/iguana_realtime.c @@ -14,7 +14,7 @@ ******************************************************************************/ #include "iguana777.h" -//#define ENABLE_RAMCHAIN +#define ENABLE_RAMCHAIN void iguana_RTramchainfree(struct iguana_info *coin,struct iguana_bundle *bp) { diff --git a/iguana/iguana_volatiles.c b/iguana/iguana_volatiles.c index f7651f142..e25a8ae13 100755 --- a/iguana/iguana_volatiles.c +++ b/iguana/iguana_volatiles.c @@ -43,7 +43,7 @@ int32_t iguana_utxoupdate(struct iguana_info *coin,int16_t spent_hdrsi,uint32_t hhutxo->u.spentflag = 0; hhutxo->u.fromheight = 0; hhutxo->u.prevunspentind = 0; - free(hhutxo); + //free(hhutxo); } } if ( coin->accountstable != 0 ) @@ -52,7 +52,7 @@ int32_t iguana_utxoupdate(struct iguana_info *coin,int16_t spent_hdrsi,uint32_t { hhacct->a.lastunspentind = 0; hhacct->a.total = 0; - free(hhacct); + //free(hhacct); } } return(0); diff --git a/includes/iguana_defines.h b/includes/iguana_defines.h index 0eeaebe81..e4c846c90 100755 --- a/includes/iguana_defines.h +++ b/includes/iguana_defines.h @@ -78,7 +78,7 @@ struct iguana_txdatabits { uint64_t addrind:IGUANA_LOG2MAXPEERS,filecount:10,fpo #define IGUANA_DEDICATED_THREADS #ifdef IGUANA_DEDICATED_THREADS -#define IGUANA_MAXCONNTHREADS 32 +#define IGUANA_MAXCONNTHREADS 16 #define IGUANA_MAXSENDTHREADS (IGUANA_MAXPEERS>>2) #define IGUANA_MAXRECVTHREADS (IGUANA_MAXPEERS>>2) #else diff --git a/includes/iguana_globals.h b/includes/iguana_globals.h index 7b073f60a..fb7db721a 100755 --- a/includes/iguana_globals.h +++ b/includes/iguana_globals.h @@ -42,7 +42,7 @@ char GLOBAL_GENESISDIR[512] = "genesis"; char GLOBAL_VALIDATEDIR[512] = "DB/purgeable"; char GLOBAL_CONFSDIR[512] = "confs"; #ifdef __linux -int32_t IGUANA_NUMHELPERS = 1; +int32_t IGUANA_NUMHELPERS = 4; #else int32_t IGUANA_NUMHELPERS = 1; #endif