From 16d66dcc1c42dd50cf05a3ae50f4be6f3640893c Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 15 Jul 2017 23:23:15 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_prices.c | 4 ++-- iguana/exchanges/LP_rpc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_prices.c b/iguana/exchanges/LP_prices.c index d1011b0a3..2da6ecf02 100644 --- a/iguana/exchanges/LP_prices.c +++ b/iguana/exchanges/LP_prices.c @@ -721,7 +721,7 @@ void prices_loop(void *ignore) price = 0.5 * (coinpp->bid + coinpp->ask); if ( (margin= coinpp->margins[btcpp->ind]) != 0. ) { - price *= (1. + margin); + price *= (1. - margin); if ( (minprice= coinpp->minprices[btcpp->ind]) == 0. || price >= minprice ) { LP_mypriceset(&changed,"BTC",name,price); @@ -731,7 +731,7 @@ void prices_loop(void *ignore) } if ( (margin= btcpp->margins[coinpp->ind]) != 0. ) { - price *= (1. - margin); + price = 1. / (price * (1. + margin)); if ( (minprice= btcpp->minprices[coinpp->ind]) == 0. || price >= minprice ) { LP_mypriceset(&changed,name,"BTC",price); diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 775222e4d..a27203fb9 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -281,7 +281,7 @@ cJSON *LP_importprivkey(char *symbol,char *wifstr,char *label,int32_t flag) if ( jobj(retjson,"ismine") != 0 && is_cJSON_True(jobj(retjson,"ismine")) != 0 ) { doneflag = 1; - printf("%s already ismine\n",address); + //printf("%s already ismine\n",address); } free_json(retjson); }