From 76601ae7d13a7fd66d95a65ee0f68545b74af327 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 17 Jun 2017 16:05:35 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_commands.c | 2 +- iguana/exchanges/LP_ordermatch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index 6bd88ada0..1edcc4e4d 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -208,7 +208,7 @@ forwardhex(pubkey,hex)\n\ else if ( strcmp(method,"notified") == 0 ) { LP_utxoaddjson(1,LP_mypubsock,argjson); - retstr = clonestr("{\"result\":\"success\",\"notifyutxo\":\"received\"}"); + return(clonestr("{\"result\":\"success\",\"notifyutxo\":\"received\"}")); } else if ( IAMLP != 0 ) { diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 884bf34ca..84d277f4e 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -563,7 +563,7 @@ char *LP_autotrade(char *myipaddr,int32_t mypubsock,double profitmargin,char *ba { destsatoshis = (butxo->S.satoshis * price); if ( destsatoshis > autxo->payment.value-desttxfee ) - destsatoshis *= ((double)autxo->payment.value / (destsatoshis - desttxfee)); + destsatoshis *= ((double)autxo->payment.value / (destsatoshis + desttxfee)); if ( destsatoshis > desttxfee && destsatoshis-desttxfee > (autxo->payment.value >> 1) && destsatoshis/price-txfee > (butxo->S.satoshis >> 1) ) { printf("price %.8f/%.8f best %.8f destsatoshis %.8f * metric %.8f -> (%f)\n",price,bestprice,bestmetric,dstr(destsatoshis),metric,dstr(destsatoshis) * metric * metric * metric);