jl777 8 years ago
parent
commit
853bb5b7dd
  1. 5
      iguana/iguana_rpc.c
  2. 2
      iguana/tests/LPinit

5
iguana/iguana_rpc.c

@ -1054,7 +1054,7 @@ char *SuperNET_rpcparse(struct supernet_info *myinfo,char *retbuf,int32_t bufsiz
for (i=0; i<n; i++) for (i=0; i<n; i++)
{ {
argjson = jitem(origargjson,i); argjson = jitem(origargjson,i);
//printf("after urlconv.(%s) argjson.(%s)\n",jprint(json,0),jprint(argjson,0)); //printf("after urlconv.(%s) argjson.(%s)\n",jprint(json,0),jprint(argjson,0));
coin = iguana_coinchoose(myinfo,symbol,argjson,port); coin = iguana_coinchoose(myinfo,symbol,argjson,port);
if ( (retstr= SuperNET_JSON(myinfo,coin,argjson,remoteaddr,port)) != 0 ) if ( (retstr= SuperNET_JSON(myinfo,coin,argjson,remoteaddr,port)) != 0 )
{ {
@ -1072,8 +1072,11 @@ char *SuperNET_rpcparse(struct supernet_info *myinfo,char *retbuf,int32_t bufsiz
coin = iguana_coinchoose(myinfo,symbol,argjson,port); coin = iguana_coinchoose(myinfo,symbol,argjson,port);
retstr = SuperNET_JSON(myinfo,coin,argjson,remoteaddr,port); retstr = SuperNET_JSON(myinfo,coin,argjson,remoteaddr,port);
} }
free_json(argjson);
free_json(json);
return(retstr); return(retstr);
} }
free_json(argjson);
*jsonflagp = 1; *jsonflagp = 1;
return(clonestr("{\"error\":\"couldnt process packet\"}")); return(clonestr("{\"error\":\"couldnt process packet\"}"));
} }

2
iguana/tests/LPinit

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"tradebot\",\"method\":\"liquidity\",\"targetcoin\",\"BTCD\",\"vals\":{\"profit\":0.005}}" curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"tradebot\",\"method\":\"liquidity\",\"targetcoin\":\"BTCD\",\"vals\":{\"profit\":0.005}}"

Loading…
Cancel
Save