From b20d39f8632cb156651f8bf91ee7d589d2c46e7e Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 21 Sep 2017 13:53:35 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_ordermatch.c | 5 +++-- iguana/exchanges/LP_rpc.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 2f910abea..a77b983a7 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -696,10 +696,11 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, char *method,*msg; cJSON *retjson; double qprice,price,bid,ask; struct LP_utxoinfo A,B,*autxo,*butxo; struct LP_address_utxo **utxos; struct LP_quoteinfo Q; int32_t retval = -1,max=10000; if ( (method= jstr(argjson,"method")) != 0 && (strcmp(method,"request") == 0 ||strcmp(method,"connect") == 0) ) { - printf("TRADECOMMAND.(%s)\n",jprint(argjson,0)); retval = 1; - if ( LP_quoteparse(&Q,argjson) == 0 && bits256_cmp(LP_mypub25519,Q.srchash) == 0 ) + printf("LP_tradecommand: check received %s\n",method); + if ( LP_quoteparse(&Q,argjson) == 0 && bits256_cmp(LP_mypub25519,Q.srchash) == 0 && bits256_cmp(LP_mypub25519,Q.desthash) != 0 ) { + printf("TRADECOMMAND.(%s)\n",jprint(argjson,0)); if ( (price= LP_myprice(&bid,&ask,Q.srccoin,Q.destcoin)) <= SMALLVAL || ask <= SMALLVAL ) { printf("this node has no price for %s/%s\n",Q.srccoin,Q.destcoin); diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 4c25b26a4..013e25114 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -506,7 +506,7 @@ void LP_listunspent_issue(char *symbol,char *coinaddr) if ( strcmp(coin->smartaddr,coinaddr) == 0 ) { retjson = LP_listunspent(symbol,coinaddr); - printf("SELF_LISTUNSPENT.(%s %s)\n",symbol,coinaddr); + //printf("SELF_LISTUNSPENT.(%s %s)\n",symbol,coinaddr); } else if ( (destport= LP_randpeer(destip)) > 0 ) {