Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
de97223077
  1. 2
      iguana/iguana_chains.c
  2. 4
      iguana/iguana_ramchain.c
  3. 4
      iguana/main.c

2
iguana/iguana_chains.c

@ -497,6 +497,8 @@ void iguana_chaininit(struct iguana_chain *chain,int32_t hasheaders,cJSON *argjs
strcpy(chain->gethdrsmsg,"getblocks"); strcpy(chain->gethdrsmsg,"getblocks");
chain->bundlesize = _IGUANA_BLOCKHASHES; chain->bundlesize = _IGUANA_BLOCKHASHES;
} }
if ( strcmp(chain->symbol,"BTC") == 0 )
chain->bundlesize = 100;
decode_hex((uint8_t *)chain->genesis_hashdata,32,(char *)chain->genesis_hash); decode_hex((uint8_t *)chain->genesis_hashdata,32,(char *)chain->genesis_hash);
if ( chain->rpcport == 0 ) if ( chain->rpcport == 0 )
chain->rpcport = chain->portp2p + 1; chain->rpcport = chain->portp2p + 1;

4
iguana/iguana_ramchain.c

@ -713,7 +713,7 @@ int32_t iguana_ramchain_prefetch(struct iguana_info *coin,struct iguana_ramchain
//return(0); //return(0);
if ( (rdata= ramchain->H.data) != 0 ) if ( (rdata= ramchain->H.data) != 0 )
{ {
printf("start PREFETCH.[%d] flag.%d -> nonz.%d\n",rdata->height,flag,nonz); //printf("start PREFETCH.[%d] flag.%d -> nonz.%d\n",rdata->height,flag,nonz);
if ( flag == 0 ) if ( flag == 0 )
{ {
ptr = ramchain->fileptr; ptr = ramchain->fileptr;
@ -773,7 +773,7 @@ int32_t iguana_ramchain_prefetch(struct iguana_info *coin,struct iguana_ramchain
if ( PKbits[i] != 0 ) if ( PKbits[i] != 0 )
nonz++; nonz++;
} }
printf("done PREFETCH.[%d] flag.%d -> nonz.%d\n",rdata->height,flag,nonz); //printf("done PREFETCH.[%d] flag.%d -> nonz.%d\n",rdata->height,flag,nonz);
} }
return(nonz); return(nonz);
} }

4
iguana/main.c

@ -553,10 +553,10 @@ void iguana_appletests(struct supernet_info *myinfo)
bitcoin_sharedsecret(myinfo->ctx,hash2,pubkey,33); bitcoin_sharedsecret(myinfo->ctx,hash2,pubkey,33);
printf("secp256k1 elapsed %.3f for %d iterations\n",OS_milliseconds() - startmillis,i); printf("secp256k1 elapsed %.3f for %d iterations\n",OS_milliseconds() - startmillis,i);
getchar();**/ getchar();**/
if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"protover\":70002,\"RELAY\":1,\"VALIDATE\":1,\"portp2p\":14631,\"rpc\":14632,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":64,\"endpend\":64,\"services\":129,\"maxpeers\":8,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":1,\"poll\":100}"),0,myinfo->rpcport)) != 0 ) if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"protover\":70002,\"RELAY\":1,\"VALIDATE\":1,\"portp2p\":14631,\"rpc\":14632,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":4,\"endpend\":1,\"services\":129,\"maxpeers\":8,\"newcoin\":\"BTCD\",\"active\":1,\"numhelpers\":1,\"poll\":100}"),0,myinfo->rpcport)) != 0 )
{ {
free(str); free(str);
if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"portp2p\":8333,\"RELAY\":0,\"VALIDATE\":0,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":1,\"endpend\":1,\"services\":128,\"maxpeers\":8,\"newcoin\":\"BTC\",\"active\":0,\"numhelpers\":1,\"poll\":100}"),0,myinfo->rpcport)) != 0 ) if ( 1 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"portp2p\":8333,\"RELAY\":1,\"VALIDATE\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"startpend\":1,\"endpend\":1,\"services\":128,\"maxpeers\":8,\"newcoin\":\"BTC\",\"active\":0,\"numhelpers\":1,\"poll\":100}"),0,myinfo->rpcport)) != 0 )
{ {
free(str); free(str);
if ( 0 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"agent\":\"SuperNET\",\"method\":\"login\",\"handle\":\"alice\",\"password\":\"alice\",\"passphrase\":\"alice\"}"),0,myinfo->rpcport)) != 0 ) if ( 0 && (str= SuperNET_JSON(myinfo,cJSON_Parse("{\"agent\":\"SuperNET\",\"method\":\"login\",\"handle\":\"alice\",\"password\":\"alice\",\"passphrase\":\"alice\"}"),0,myinfo->rpcport)) != 0 )

Loading…
Cancel
Save