Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
019acb03b8
  1. 2
      iguana/iguana_recv.c
  2. 3
      iguana/iguana_rpc.c
  3. 2
      iguana/main.c

2
iguana/iguana_recv.c

@ -1866,7 +1866,7 @@ int32_t iguana_processrecv(struct supernet_info *myinfo,struct iguana_info *coin
}
}
flag += iguana_processrecvQ(myinfo,coin,&newhwm);
if ( (rand() % 10) == 0 )
if ( coin->RTheight == 0 || (rand() % 30) == 0 )
flag += iguana_reqblocks(myinfo,coin);
if ( time(NULL) > coin->laststats+30 )
{

3
iguana/iguana_rpc.c

@ -844,7 +844,7 @@ char *SuperNET_rpcparse(struct supernet_info *myinfo,char *retbuf,int32_t bufsiz
n += i;
j = i = 0;
filetype[0] = 0;
//printf("url.(%s) method.(%s)\n",&url[i],urlmethod);
printf("url.(%s) method.(%s)\n",&url[i],urlmethod);
#ifdef __PNACL__
snprintf(furl,sizeof(furl),"%s/%s",GLOBAL_DBDIR,url+1);
#else
@ -1180,6 +1180,7 @@ void iguana_rpcloop(void *args)
if ( retstr != 0 )
{
char *response,hdrs[1024];
printf("RETURN.(%s)\n",retstr);
if ( jsonflag != 0 || postflag != 0 )
{
response = malloc(strlen(retstr)+1024+1+1);

2
iguana/main.c

@ -525,7 +525,7 @@ void iguana_appletests(struct supernet_info *myinfo)
bitcoin_sharedsecret(myinfo->ctx,hash2,pubkey,33);
printf("secp256k1 elapsed %.3f for %d iterations\n",OS_milliseconds() - startmillis,i);
getchar();**/
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 )
if ( 0 && (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);
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 )

Loading…
Cancel
Save