From cd5f624e73ae7490cf7c0865740a233d217233e6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 10 Nov 2017 00:30:27 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 3 --- iguana/exchanges/LP_ordermatch.c | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 13b14f8ee..b51741787 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -18,9 +18,6 @@ // LP_nativeDEX.c // marketmaker // -// detecting new deposits in inventory -// bot progress -// swap started event for bot // bot status 1600% ? // BCH signing diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index f6e1f325f..cf4560de3 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -1010,15 +1010,15 @@ char *LP_autobuy(void *ctx,char *myipaddr,int32_t mypubsock,char *base,char *rel destsatoshis = SATOSHIDEN * relvolume; if ( (autxo= LP_utxo_bestfit(rel,destsatoshis + 2*desttxfee)) == 0 ) return(clonestr("{\"error\":\"cant find alice utxo that is big enough\"}")); - if ( destsatoshis - 0*desttxfee < autxo->S.satoshis ) + if ( destsatoshis - desttxfee < autxo->S.satoshis ) { - //destsatoshis -= 2*desttxfee; + destsatoshis -= desttxfee; autxo->S.satoshis = destsatoshis; //printf("first path dest %.8f from %.8f\n",dstr(destsatoshis),dstr(autxo->S.satoshis)); } - else if ( autxo->S.satoshis - 0*desttxfee < destsatoshis ) + else if ( autxo->S.satoshis - desttxfee < destsatoshis ) { - autxo->S.satoshis -= 0*desttxfee; + autxo->S.satoshis -= desttxfee; destsatoshis = autxo->S.satoshis; printf("second path dest %.8f from %.8f\n",dstr(destsatoshis),dstr(autxo->S.satoshis)); }