From 019acb03b87f8a981b2ed3a0afa26786506d58c2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 27 Aug 2016 07:40:23 -0300 Subject: [PATCH] test --- iguana/iguana_recv.c | 2 +- iguana/iguana_rpc.c | 3 ++- iguana/main.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 681cb4c00..43325b9d6 100755 --- a/iguana/iguana_recv.c +++ b/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 ) { diff --git a/iguana/iguana_rpc.c b/iguana/iguana_rpc.c index 9694892ab..013c476da 100755 --- a/iguana/iguana_rpc.c +++ b/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); diff --git a/iguana/main.c b/iguana/main.c index 2a1bac4cb..8824ca7c9 100755 --- a/iguana/main.c +++ b/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 )