From dbda4bac05bb95026c2b4d8b7ea107c18d8aa992 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 4 Nov 2017 21:17:45 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_portfolio.c | 5 ++++- iguana/exchanges/stats.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_portfolio.c b/iguana/exchanges/LP_portfolio.c index 8e8dc23ca..c7ada04db 100644 --- a/iguana/exchanges/LP_portfolio.c +++ b/iguana/exchanges/LP_portfolio.c @@ -298,7 +298,7 @@ void LP_autopriceset(void *ctx,int32_t dir,struct LP_priceinfo *basepp,struct LP if ( (minprice= basepp->minprices[relpp->ind]) == 0. || price >= minprice ) { LP_mypriceset(&changed,relpp->symbol,basepp->symbol,newprice); - //printf("autoprice changed.%d %s/%s <- %.8f\n",changed,basepp->symbol,relpp->symbol,price); + printf("autoprice changed.%d %s/%s <- %.8f\n",changed,basepp->symbol,relpp->symbol,price); if ( changed != 0 || time(NULL) > lasttime+LP_ORDERBOOK_DURATION*.777) { lasttime = (uint32_t)time(NULL); @@ -468,7 +468,10 @@ void LP_autoprice_iter(void *ctx,struct LP_priceinfo *btcpp) basepp = LP_priceinfofind(LP_autorefs[i].base); relpp = LP_priceinfofind(LP_autorefs[i].rel); if ( basepp != 0 && relpp != 0 ) + { + printf("check ref-autoprice %s/%s\n",LP_autorefs[i].refbase,LP_autorefs[i].refrel); LP_autopriceset(ctx,1,basepp,relpp,0,LP_autorefs[i].refbase,LP_autorefs[i].refrel); + } } } diff --git a/iguana/exchanges/stats.c b/iguana/exchanges/stats.c index e3ee8a3b5..aa2067e0b 100644 --- a/iguana/exchanges/stats.c +++ b/iguana/exchanges/stats.c @@ -780,11 +780,11 @@ void stats_rpcloop(void *args) printf("error launching rpc handler on port %d\n",port); // yes, small leak per command } - if ( 0 && IAMLP != 0 && ipbits != localhostbits ) + /*if ( 0 && IAMLP != 0 && ipbits != localhostbits ) { close(bindsock); bindsock = iguana_socket(1,"0.0.0.0",port); - } //else printf("skip close and rebind\n"); + } //else printf("skip close and rebind\n");*/ } }