|
|
@ -290,7 +290,7 @@ char *SuperNET_processJSON(struct supernet_info *myinfo,struct iguana_info *coin |
|
|
|
}*/ |
|
|
|
jsonstr = jprint(json,0); |
|
|
|
//printf("RPC? (%s)\n",jsonstr);
|
|
|
|
if ( (immedmillis= juint(json,"immediate")) != 0 || ((remoteaddr == 0 || remoteaddr[0] == 0) && port == IGUANA_RPCPORT) ) |
|
|
|
if ( (immedmillis= juint(json,"immediate")) != 0 || ((remoteaddr == 0 || remoteaddr[0] == 0) && port == myinfo->rpcport) ) |
|
|
|
{ |
|
|
|
if ( coin != 0 ) |
|
|
|
{ |
|
|
@ -2051,7 +2051,7 @@ FOUR_STRINGS(SuperNET,login,handle,password,permanentfile,passphrase) |
|
|
|
|
|
|
|
void komodo_ICO_batch(cJSON *array,int32_t batchid) |
|
|
|
{ |
|
|
|
int32_t i,n,iter; cJSON *item; uint64_t kmdamount,revsamount; char *coinaddr,cmd[512]; double totalKMD,totalREVS; |
|
|
|
int32_t i,n,iter; cJSON *item; uint64_t kmdamount,revsamount; char *coinaddr,cmd[512]; double totalKMD,totalREVS; struct supernet_info *myinfo = SuperNET_MYINFO(0); |
|
|
|
if ( (n= cJSON_GetArraySize(array)) > 0 ) |
|
|
|
{ |
|
|
|
totalKMD = totalREVS = 0; |
|
|
@ -2070,7 +2070,7 @@ void komodo_ICO_batch(cJSON *array,int32_t batchid) |
|
|
|
{ |
|
|
|
if ( dstr(revsamount) >= 1. && (iter & 1) == 0 ) |
|
|
|
{ |
|
|
|
printf("curl --url \"http://127.0.0.1:7778\" --data \"{\\\"agent\\\":\\\"dex\\\",\\\"method\\\":\\\"importaddress\\\",\\\"address\\\":\\\"%s\\\",\\\"symbol\\\":\\\"REVS\\\"}\" # %.8f\n",coinaddr,dstr(revsamount)); |
|
|
|
printf("curl --url \"http://127.0.0.1:%u\" --data \"{\\\"agent\\\":\\\"dex\\\",\\\"method\\\":\\\"importaddress\\\",\\\"address\\\":\\\"%s\\\",\\\"symbol\\\":\\\"REVS\\\"}\" # %.8f\n",myinfo->rpcport,coinaddr,dstr(revsamount)); |
|
|
|
printf("sleep 3\n"); |
|
|
|
} else printf("sleep 1\n"); |
|
|
|
if ( (iter & 1) != 0 ) |
|
|
@ -2093,9 +2093,9 @@ void komodo_ICO_batch(cJSON *array,int32_t batchid) |
|
|
|
{ |
|
|
|
if ( (0) ) |
|
|
|
{ |
|
|
|
printf("curl --url \"http://127.0.0.1:7778\" --data \"{\\\"agent\\\":\\\"dex\\\",\\\"method\\\":\\\"importaddress\\\",\\\"address\\\":\\\"%s\\\",\\\"symbol\\\":\\\"KMD\\\"}\" # %.8f\n",coinaddr,dstr(kmdamount)); |
|
|
|
printf("curl --url \"http://127.0.0.1:%u\" --data \"{\\\"agent\\\":\\\"dex\\\",\\\"method\\\":\\\"importaddress\\\",\\\"address\\\":\\\"%s\\\",\\\"symbol\\\":\\\"KMD\\\"}\" # %.8f\n",myinfo->rpcport,coinaddr,dstr(kmdamount)); |
|
|
|
printf("sleep 3\n"); |
|
|
|
} else printf("curl --url \"http://127.0.0.1:7778\" --data \"{\\\"agent\\\":\\\"dex\\\",\\\"method\\\":\\\"listunspent\\\",\\\"address\\\":\\\"%s\\\",\\\"symbol\\\":\\\"KMD\\\"}\"\n",coinaddr); |
|
|
|
} else printf("curl --url \"http://127.0.0.1:%u\" --data \"{\\\"agent\\\":\\\"dex\\\",\\\"method\\\":\\\"listunspent\\\",\\\"address\\\":\\\"%s\\\",\\\"symbol\\\":\\\"KMD\\\"}\"\n",myinfo->rpcport,coinaddr); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
@ -2114,7 +2114,7 @@ void komodo_ICO_batch(cJSON *array,int32_t batchid) |
|
|
|
|
|
|
|
void komodo_REVS_merge(char *str,char *str2) |
|
|
|
{ |
|
|
|
char line[1024],line2[1024],*coinaddr; int32_t i,n=0,m=0,k=0; |
|
|
|
char line[1024],line2[1024],*coinaddr; int32_t i,n=0,m=0,k=0; struct supernet_info *myinfo = SuperNET_MYINFO(0); |
|
|
|
while ( 1 ) |
|
|
|
{ |
|
|
|
if ( str[n] == 0 || str2[m] == 0 ) |
|
|
@ -2136,7 +2136,7 @@ void komodo_REVS_merge(char *str,char *str2) |
|
|
|
coinaddr[i] = 0; |
|
|
|
if ( atof(&coinaddr[i+1]) > 1 ) |
|
|
|
{ |
|
|
|
printf("curl --url \"http://127.0.0.1:7778\" --data \"{\\\"agent\\\":\\\"dex\\\",\\\"method\\\":\\\"importaddress\\\",\\\"address\\\":\\\"%s\\\",\\\"symbol\\\":\\\"REVS\\\"}\" # %.8f\n",coinaddr,atof(coinaddr+i+1)); |
|
|
|
printf("curl --url \"http://127.0.0.1:%u\" --data \"{\\\"agent\\\":\\\"dex\\\",\\\"method\\\":\\\"importaddress\\\",\\\"address\\\":\\\"%s\\\",\\\"symbol\\\":\\\"REVS\\\"}\" # %.8f\n",myinfo->rpcport,coinaddr,atof(coinaddr+i+1)); |
|
|
|
printf("sleep 3\n"); |
|
|
|
} |
|
|
|
k++; |
|
|
|