From 24ae0ec07dcbb97c031d2ff52ea9e0a8d1c65086 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 2 Nov 2016 21:43:33 -0300 Subject: [PATCH] test --- iguana/iguana_blocks.c | 20 +------------------- includes/iguana_globals.h | 2 +- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/iguana/iguana_blocks.c b/iguana/iguana_blocks.c index 722b4ec20..38e2656d9 100755 --- a/iguana/iguana_blocks.c +++ b/iguana/iguana_blocks.c @@ -203,16 +203,8 @@ void _iguana_blocklink(struct iguana_info *coin,struct iguana_block *prev,struct struct iguana_block *iguana_blockhashset(char *debugstr,struct iguana_info *coin,int32_t height,bits256 hash2,int32_t createflag) { struct iguana_block *block,*prev; int32_t size; - /*while ( coin->blockdepth > 0 ) - { - usleep(100000); - if ( coin->blockdepth > 0 ) - printf("A %s >>>>>>>>>> OK only if rare %s blockhashset.%d depth.%d\n",coin->symbol,debugstr,height,coin->blockdepth); - //fprintf(stderr,">>>>>>>>>> OK only if rare %s blockhashset.%d depth.%d\n",debugstr,height,depth); - //printf("%d\n",1/(1 - depth/depth)); - }*/ #ifndef __APPLE__ - //usleep(100); + usleep(1000); #endif portable_mutex_lock(&coin->blocks_mutex); coin->blockdepth++; @@ -221,20 +213,11 @@ struct iguana_block *iguana_blockhashset(char *debugstr,struct iguana_info *coin { if ( coin->blockdepth > 0 ) coin->blockdepth--; - /*while ( coin->blockdepth > 0 ) - { - usleep(100000); - if ( coin->blockdepth > 0 ) - printf("B %s >>>>>>>>>> OK only if rare %s match blockhashset.%d depth.%d\n",coin->symbol,debugstr,height,coin->blockdepth); - //fprintf(stderr,">>>>>>>>>> OK only if rare%s match blockhashset.%d depth.%d\n",debugstr,height,depth); - //printf("%d\n",1/(1 - depth/depth)); - }*/ portable_mutex_unlock(&coin->blocks_mutex); return(block); } if ( createflag > 0 ) { - //portable_mutex_lock(&coin->blocks_mutex); size = (int32_t)((coin->chain->zcash != 0) ? sizeof(struct iguana_zblock) : sizeof(struct iguana_block)); block = calloc(1,size); block->RO.hash2 = hash2; @@ -260,7 +243,6 @@ struct iguana_block *iguana_blockhashset(char *debugstr,struct iguana_info *coin if ( tmp != block ) printf("%s height.%d search error %p != %p\n",str,height,block,tmp); } - //portable_mutex_unlock(&coin->blocks_mutex); } if ( coin->blockdepth > 0 ) coin->blockdepth--; diff --git a/includes/iguana_globals.h b/includes/iguana_globals.h index 3c77b45fc..5d8c57f94 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 = 8; #else int32_t IGUANA_NUMHELPERS = 1; #endif