From ac9dfb252233a64598f4a0eb7599dfa65c6d7adb Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 25 Jul 2017 11:48:29 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_commands.c | 2 -- iguana/exchanges/LP_ordermatch.c | 2 ++ iguana/exchanges/LP_prices.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index 3bb040fc4..1a98996a2 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -221,8 +221,6 @@ trust(pubkey, trust)\n\ { if ( price > SMALLVAL ) { - printf("price set (%s/%s) <- %.8f\n",rel,base,1./price); - LP_mypriceset(&changed,rel,base,1./price); return(LP_autotrade(ctx,myipaddr,pubsock,base,rel,price,jdouble(argjson,"relvolume"),jint(argjson,"timeout"),jint(argjson,"duration"))); } else return(clonestr("{\"error\":\"no price set\"}")); } diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 4ac6a6109..6e6257849 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -662,6 +662,8 @@ struct LP_utxoinfo *LP_bestutxo(double *ordermatchpricep,int64_t *bestsatoshisp, } if ( bestutxo == 0 || *ordermatchpricep == 0. || *bestdestsatoshisp == 0 ) return(0); + int32_t changed; + LP_mypriceset(&changed,autxo->coin,base,1. / *ordermatchpricep); return(bestutxo); } diff --git a/iguana/exchanges/LP_prices.c b/iguana/exchanges/LP_prices.c index 7c78752c7..bbd71582e 100644 --- a/iguana/exchanges/LP_prices.c +++ b/iguana/exchanges/LP_prices.c @@ -271,9 +271,9 @@ double LP_pricecache(struct LP_quoteinfo *qp,char *base,char *rel,bits256 txid,i ptr->price = (double)ptr->Q.destsatoshis / ptr->Q.satoshis; if ( LP_pricevalid(ptr->price) <= 0 ) ptr->price = 0.; - printf("LP_pricecache: set %s/%s ptr->price %.8f\n",base,rel,ptr->price); + //printf("LP_pricecache: set %s/%s ptr->price %.8f\n",base,rel,ptr->price); } - printf("found %s/%s %.8f\n",base,rel,ptr->price); + //printf("found %s/%s %.8f\n",base,rel,ptr->price); return(ptr->price); } //char str[65]; printf("cachemiss %s/%s %s/v%d\n",base,rel,bits256_str(str,txid),vout);