From 53f20fe033ddacc213a3cebc463a9e2272320d9d Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 24 Nov 2017 13:50:24 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_commands.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index 310de97ae..618aec6b0 100644 --- a/iguana/exchanges/LP_commands.c +++ b/iguana/exchanges/LP_commands.c @@ -631,15 +631,18 @@ zeroconf_claim(address, expiration=0)\n\ else if ( strcmp(method,"tradestatus") == 0 ) { - bits256 zero; cJSON *tmpjson; + bits256 zero; cJSON *tmpjson; struct LP_quoteinfo Q; + LP_tradecommand_log(argjson); + LP_quoteparse(&Q,argjson); + LP_requestinit(&Q.R,Q.srchash,Q.desthash,Q.srccoin,Q.satoshis-Q.txfee,Q.destcoin,Q.destsatoshis-Q.desttxfee,Q.timestamp,Q.quotetime,0); LP_tradecommand_log(argjson); - //printf("GOT TRADESTATUS! %s\n",jprint(argjson,0)); if ( LP_statslog_parse() > 0 ) { memset(zero.bytes,0,sizeof(zero)); if ( (tmpjson= LP_statslog_disp(2000000000,2000000000,"",zero,0,0))) // pending swaps free_json(tmpjson); } + printf("%-4d (%-10u %10u) %12s id.%22llu %5s/%-5s %12.8f -> %11.8f price %11.8f | RT.%d %d\n",(uint32_t)time(NULL) % 3600,Q.R.requestid,Q.R.quoteid,method,(long long)Q.aliceid,Q.srccoin,Q.destcoin,dstr(Q.satoshis),dstr(Q.destsatoshis),(double)Q.destsatoshis/Q.satoshis,LP_RTcount,LP_swapscount); retstr = clonestr("{\"result\":\"success\"}"); } else if ( strcmp(method,"wantnotify") == 0 )