|
|
@ -288,12 +288,16 @@ char *iguana_agentjson(char *name,struct iguana_info *coin,char *method,cJSON *j |
|
|
|
{ |
|
|
|
retjson = cJSON_CreateObject(); |
|
|
|
jaddstr(retjson,"agent","SuperNET"); |
|
|
|
jaddstr(retjson,"method","peers"); |
|
|
|
jaddstr(retjson,"method","mypeers"); |
|
|
|
jaddstr(retjson,"result","peers found"); |
|
|
|
jadd(retjson,"peers",array); |
|
|
|
return(jprint(retjson,1)); |
|
|
|
} else return(clonestr("{\"error\":\"no peers found\"}")); |
|
|
|
} |
|
|
|
else if ( strcmp(method,"mypeers") == 0 ) |
|
|
|
{ |
|
|
|
printf("mypeers from %s\n",remoteaddr!=0?remoteaddr:"local"); |
|
|
|
} |
|
|
|
} |
|
|
|
else // local api
|
|
|
|
{ |
|
|
|