Browse Source

Test

etomic
jl777 7 years ago
parent
commit
c1f4333499
  1. 4
      iguana/exchanges/LP_commands.c
  2. 1
      iguana/exchanges/LP_ordermatch.c
  3. 2
      iguana/exchanges/LP_prices.c

4
iguana/exchanges/LP_commands.c

@ -95,7 +95,7 @@ char *stats_JSON(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,char *r
return(clonestr("{\"result\":\" \
available localhost RPC commands:\n \
setprice(base, rel, price)\n\
autoprice(base, rel, price, margin)\n\
autoprice(base, rel, price, margin, type)\n\
myprice(base, rel)\n\
enable(coin)\n\
disable(coin)\n\
@ -172,7 +172,7 @@ trust(pubkey, trust)\n\
}
else if ( strcmp(method,"autoprice") == 0 )
{
if ( LP_autoprice(base,rel,price,jdouble(argjson,"margin")) < 0 )
if ( LP_autoprice(base,rel,price,jdouble(argjson,"margin"),jstr(argjson,"type")) < 0 )
return(clonestr("{\"error\":\"couldnt set autoprice\"}"));
else return(clonestr("{\"result\":\"success\"}"));
}

1
iguana/exchanges/LP_ordermatch.c

@ -201,7 +201,6 @@ char *LP_pricepings(void *ctx,char *myipaddr,int32_t pubsock,char *base,char *re
msg = jprint(reqjson,1);
LP_broadcast_message(pubsock,base,rel,zero,msg);
printf("broadcast.(%s)\n",msg);
free(msg);
return(clonestr("{\"result\":\"success\"}"));
}

2
iguana/exchanges/LP_prices.c

@ -657,7 +657,7 @@ void LP_pricefeedupdate(bits256 pubkey,char *base,char *rel,double price)
int32_t LP_autoprices;
int32_t LP_autoprice(char *base,char *rel,double minprice,double margin)
int32_t LP_autoprice(char *base,char *rel,double minprice,double margin,char *type)
{
struct LP_priceinfo *basepp,*relpp;
if ( (basepp= LP_priceinfofind(base)) != 0 && (relpp= LP_priceinfofind(rel)) != 0 )

Loading…
Cancel
Save