Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
d2b729818c
  1. 18
      iguana/iguana_init.c
  2. 9
      iguana/iguana_unspents.c
  3. 2
      iguana/main.c

18
iguana/iguana_init.c

@ -480,16 +480,16 @@ struct iguana_info *iguana_coinstart(struct iguana_info *coin,int32_t initialhei
printf("error launching accept thread for port.%u\n",coin->chain->portp2p);
}
}
if ( coin->rpcloop == 0 )
}
if ( (coin->myservices & 0x80) == 0x80 && coin->rpcloop == 0 )
{
myinfo->argport = coin->chain->rpcport;
coin->rpcloop = malloc(sizeof(pthread_t));
if ( OS_thread_create(coin->rpcloop,NULL,(void *)iguana_rpcloop,(void *)myinfo) != 0 )
{
myinfo->argport = coin->chain->rpcport;
coin->rpcloop = malloc(sizeof(pthread_t));
if ( OS_thread_create(coin->rpcloop,NULL,(void *)iguana_rpcloop,(void *)myinfo) != 0 )
{
free(coin->rpcloop);
coin->rpcloop = 0;
printf("error launching rpcloop for %s port.%u\n",coin->symbol,coin->chain->rpcport);
}
free(coin->rpcloop);
coin->rpcloop = 0;
printf("error launching rpcloop for %s port.%u\n",coin->symbol,coin->chain->rpcport);
}
}
//coin->firstblock = coin->blocks.parsedblocks + 1;

9
iguana/iguana_unspents.c

@ -884,8 +884,11 @@ uint32_t iguana_fastfindinit(struct iguana_info *coin)
if ( (num+1)*16 + tablesize*sizeof(*hashtable) == coin->fastsizes[i] )
{
hashtable = (int32_t *)((long)sorted + (1 + num)*16);
coin->fasttables[i] = calloc(tablesize,sizeof(*hashtable));
memcpy(coin->fasttables[i],hashtable,tablesize * sizeof(*hashtable));
if ( 0 )
{
coin->fasttables[i] = calloc(tablesize,sizeof(*hashtable));
memcpy(coin->fasttables[i],hashtable,tablesize * sizeof(*hashtable));
}
}
else
{
@ -1434,7 +1437,7 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp,st
}
for (k=0; k<T[txidind].numvins && errs==0; k++,spendind++)
{
if ( bp == coin->current && (spendind % 1000) == 0 )
if ( bp == coin->current && (spendind % 100) == 0 )
printf("[%-3d:%4d] spendvectors elapsed t.%-3d spendind.%d\n",bp->hdrsi,i,(uint32_t)time(NULL)-starttime,spendind);
u = 0;
spentbp = 0;

2
iguana/main.c

@ -1146,7 +1146,7 @@ void iguana_appletests(struct supernet_info *myinfo)
exit(-1);
}
sleep(1);*/
if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"prefetchlag\":-1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":500,\"endpend\":500,\"services\":128,\"maxpeers\":64,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":4,\"poll\":1}"),0,myinfo->rpcport)) != 0 )
if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"prefetchlag\":-1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":500,\"endpend\":500,\"services\":128,\"maxpeers\":64,\"newcoin\":\"BTC\",\"active\":1,\"numhelpers\":4,\"poll\":1}"),0,myinfo->rpcport)) != 0 )
{
free(str);
if ( 0 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"userhome\":\"/Users/jimbolaptop/Library/Application Support\",\"agent\":\"iguana\",\"method\":\"addcoin\",\"services\":1024,\"maxpeers\":256,\"newcoin\":\"BTCD\",\"active\":1}"),0,myinfo->rpcport)) != 0 )

Loading…
Cancel
Save