Browse Source

test

olddPoW
jl777 8 years ago
parent
commit
bdda8f0c4a
  1. 27
      iguana/iguana_blocks.c
  2. 4
      iguana/iguana_notary.c

27
iguana/iguana_blocks.c

@ -214,24 +214,8 @@ struct iguana_block *iguana_blockhashset(char *debugstr,struct iguana_info *coin
portable_mutex_lock(&coin->blocks_mutex);
coin->blockdepth++;
HASH_FIND(hh,coin->blocks.hash,&hash2,sizeof(hash2),block);
if ( block != 0 )
{
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;
@ -257,19 +241,8 @@ 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--;
portable_mutex_unlock(&coin->blocks_mutex);
/* while ( coin->blockdepth > 0 )
{
usleep(100000);
if ( coin->blockdepth > 0 )
printf("C %s >>>>>>>>>> OK only if rare %s create blockhashset.%d depth.%d\n",coin->symbol,debugstr,height,coin->blockdepth);
//fprintf(stderr,">>>>>>>>>> OK only if rare%s create blockhashset.%d depth.%d\n",debugstr,height,depth);
//printf("%d\n",1/(1 - depth/depth));
}*/
return(block);
}

4
iguana/iguana_notary.c

@ -262,14 +262,14 @@ char *dpow_passthru(struct iguana_info *coin,char *function,char *hex)
TWO_STRINGS(zcash,passthru,function,hex)
{
if ( (coin= iguana_coinfind("ZEC")) != 0 && coin->chain->serverport[0] != 0 )
if ( (coin= iguana_coinfind("ZEC")) != 0 )//&& coin->chain->userpass[0] != 0 )
return(dpow_passthru(coin,function,hex));
else return(clonestr("{\"error\":\"ZEC not active, start in bitcoind mode\"}"));
}
TWO_STRINGS(komodo,passthru,function,hex)
{
if ( (coin= iguana_coinfind("KMD")) != 0 && coin->chain->serverport[0] != 0 )
if ( (coin= iguana_coinfind("KMD")) != 0 )//&& coin->chain->userpass[0] != 0 )
return(dpow_passthru(coin,function,hex));
else return(clonestr("{\"error\":\"KMD not active, start in bitcoind mode\"}"));
}

Loading…
Cancel
Save