From b0e068144dcb1e3913fe3d2fa37b9031e02b4d6b Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 26 Nov 2017 20:01:06 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_ordermatch.c | 9 +++++++-- iguana/exchanges/LP_prices.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 6f8ca81cf..60b317a1d 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -1240,9 +1240,14 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, } } price = LP_myprice(&bid,&ask,Q.srccoin,Q.destcoin); - if ( (coin= LP_coinfind(Q.srccoin)) == 0 || price <= SMALLVAL || ask <= SMALLVAL ) + if ( (coin= LP_coinfind(Q.srccoin)) == 0 || coin->inactive != 0 ) { - printf("this node has no price for %s/%s\n",Q.srccoin,Q.destcoin); + printf("%s is not active\n",Q.srccoin); + return(retval); + } + if ( price <= SMALLVAL || ask <= SMALLVAL ) + { + //printf("this node has no price for %s/%s\n",Q.srccoin,Q.destcoin); return(retval); } if ( LP_aliceonly(Q.srccoin) > 0 ) diff --git a/iguana/exchanges/LP_prices.c b/iguana/exchanges/LP_prices.c index 43bb8c8d0..a41a7ac7e 100644 --- a/iguana/exchanges/LP_prices.c +++ b/iguana/exchanges/LP_prices.c @@ -576,7 +576,7 @@ int32_t LP_mypriceset(int32_t *changedp,char *base,char *rel,double price) if ( fabs(basepp->myprices[relpp->ind] - price)/price > 0.001 ) *changedp = 1; basepp->myprices[relpp->ind] = price; // ask - printf("LP_mypriceset base.%s rel.%s <- price %.8f\n",base,rel,price); + //printf("LP_mypriceset base.%s rel.%s <- price %.8f\n",base,rel,price); //relpp->myprices[basepp->ind] = (1. / price); // bid if ( (pubp= LP_pubkeyadd(G.LP_mypub25519)) != 0 ) {