From fdbe1c744c2f3086cd71c2116c9e65cdfcd11bb8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 30 Sep 2017 21:17:10 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_ordermatch.c | 3 ++- iguana/exchanges/LP_prices.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 48ad01f89..c444653a7 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -1065,9 +1065,10 @@ char *LP_autobuy(void *ctx,char *myipaddr,int32_t mypubsock,char *base,char *rel timeout = LP_AUTOTRADE_TIMEOUT; if ( maxprice <= 0. || relvolume <= 0. || LP_priceinfofind(base) == 0 || LP_priceinfofind(rel) == 0 ) return(clonestr("{\"error\":\"invalid parameter\"}")); + maxprice *= 1.005; memset(pubkeys,0,sizeof(pubkeys)); LP_txfees(&txfee,&desttxfee,base,rel); - destsatoshis = SATOSHIDEN * relvolume + 3*desttxfee; + destsatoshis = SATOSHIDEN * relvolume + 2*desttxfee; if ( (autxo= LP_utxo_bestfit(rel,destsatoshis)) == 0 ) return(clonestr("{\"error\":\"cant find utxo that is big enough\"}")); if ( destsatoshis < autxo->S.satoshis ) diff --git a/iguana/exchanges/LP_prices.c b/iguana/exchanges/LP_prices.c index 0a051e362..f60b025b4 100644 --- a/iguana/exchanges/LP_prices.c +++ b/iguana/exchanges/LP_prices.c @@ -703,7 +703,7 @@ int32_t LP_orderbook_utxoentries(uint32_t now,int32_t polarity,char *base,char * { if ( memcmp(zeroes,pubp->rmd160,sizeof(pubp->rmd160)) == 0 ) { - printf("skip pubp since no rmd160\n"); + //printf("skip pubp since no rmd160\n"); continue; } bitcoin_address(coinaddr,basecoin->taddr,basecoin->pubtype,pubp->rmd160,sizeof(pubp->rmd160));