test
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
void komodo_gateway_iteration(char *symbol)
|
void komodo_gateway_iteration(char *symbol)
|
||||||
{
|
{
|
||||||
char *retstr; static uint32_t r,n,counter=0;
|
char *retstr; int32_t i,num; cJSON *item,*listobj; static uint32_t r,n,counter=0;
|
||||||
if ( r == 0 )
|
if ( r == 0 )
|
||||||
r = rand();
|
r = rand();
|
||||||
if ( (counter++ % 10) == (r % 10) )
|
if ( (counter++ % 10) == (r % 10) )
|
||||||
@@ -25,6 +25,23 @@ void komodo_gateway_iteration(char *symbol)
|
|||||||
{
|
{
|
||||||
//printf("GETINFO from.%s (%s)\n",ASSETCHAINS_SYMBOL,retstr);
|
//printf("GETINFO from.%s (%s)\n",ASSETCHAINS_SYMBOL,retstr);
|
||||||
free(retstr);
|
free(retstr);
|
||||||
|
if ( (retstr= komodo_issuemethod((char *)"listtransactions",0,7771)) != 0 )
|
||||||
|
{
|
||||||
|
//printf("LIST.(%s)\n",retstr);
|
||||||
|
if ( (listobj= cJSON_Parse(retstr)) != 0 )
|
||||||
|
{
|
||||||
|
if ( (num= cJSON_GetArraySize(listobj)) > 0 )
|
||||||
|
{
|
||||||
|
for (i=0; i<num; i++)
|
||||||
|
{
|
||||||
|
item = jitem(listobj,i);
|
||||||
|
printf("%d.(%s)\n",i,jprint(item,0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free_json(listobj);
|
||||||
|
}
|
||||||
|
free(retstr);
|
||||||
|
}
|
||||||
n++;
|
n++;
|
||||||
} else printf("error from %s\n",symbol);
|
} else printf("error from %s\n",symbol);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user