Browse Source

test

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

4
iguana/iguana_init.c

@ -480,7 +480,8 @@ struct iguana_info *iguana_coinstart(struct iguana_info *coin,int32_t initialhei
printf("error launching accept thread for port.%u\n",coin->chain->portp2p); 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; myinfo->argport = coin->chain->rpcport;
coin->rpcloop = malloc(sizeof(pthread_t)); coin->rpcloop = malloc(sizeof(pthread_t));
@ -491,7 +492,6 @@ struct iguana_info *iguana_coinstart(struct iguana_info *coin,int32_t initialhei
printf("error launching rpcloop for %s port.%u\n",coin->symbol,coin->chain->rpcport); printf("error launching rpcloop for %s port.%u\n",coin->symbol,coin->chain->rpcport);
} }
} }
}
//coin->firstblock = coin->blocks.parsedblocks + 1; //coin->firstblock = coin->blocks.parsedblocks + 1;
iguana_genesis(coin,coin->chain); iguana_genesis(coin,coin->chain);
memset(&lastbundle,0,sizeof(lastbundle)); memset(&lastbundle,0,sizeof(lastbundle));

5
iguana/iguana_unspents.c

@ -884,9 +884,12 @@ uint32_t iguana_fastfindinit(struct iguana_info *coin)
if ( (num+1)*16 + tablesize*sizeof(*hashtable) == coin->fastsizes[i] ) if ( (num+1)*16 + tablesize*sizeof(*hashtable) == coin->fastsizes[i] )
{ {
hashtable = (int32_t *)((long)sorted + (1 + num)*16); hashtable = (int32_t *)((long)sorted + (1 + num)*16);
if ( 0 )
{
coin->fasttables[i] = calloc(tablesize,sizeof(*hashtable)); coin->fasttables[i] = calloc(tablesize,sizeof(*hashtable));
memcpy(coin->fasttables[i],hashtable,tablesize * sizeof(*hashtable)); memcpy(coin->fasttables[i],hashtable,tablesize * sizeof(*hashtable));
} }
}
else else
{ {
printf("size error num.%d tablesize.%d -> %lu vs %ld\n",num,tablesize,(num+1)*16 + tablesize*sizeof(*hashtable),coin->fastsizes[i]); printf("size error num.%d tablesize.%d -> %lu vs %ld\n",num,tablesize,(num+1)*16 + tablesize*sizeof(*hashtable),coin->fastsizes[i]);
@ -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++) 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); printf("[%-3d:%4d] spendvectors elapsed t.%-3d spendind.%d\n",bp->hdrsi,i,(uint32_t)time(NULL)-starttime,spendind);
u = 0; u = 0;
spentbp = 0; spentbp = 0;

2
iguana/main.c

@ -1146,7 +1146,7 @@ void iguana_appletests(struct supernet_info *myinfo)
exit(-1); exit(-1);
} }
sleep(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); 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 ) 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