From 26133c53b493b3c7b6ea274ae5eb90342012ef37 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 26 Oct 2017 16:57:55 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_stats.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_stats.c b/iguana/exchanges/LP_stats.c index 62125740f..700b04c26 100644 --- a/iguana/exchanges/LP_stats.c +++ b/iguana/exchanges/LP_stats.c @@ -46,6 +46,7 @@ struct LP_swapstats struct LP_quoteinfo Q; double qprice; uint64_t aliceid; + uint32_t ind; char method[16]; } *LP_swapstats; @@ -76,7 +77,7 @@ uint64_t LP_aliceid_calc(bits256 desttxid,int32_t destvout,bits256 feetxid,int32 void LP_swapstats_line(char *line,struct LP_swapstats *sp) { char tstr[64]; - printf("%s %8s %-4d %9s swap.%016llx: (%.8f %5s) -> (%.8f %5s) qprice %.8f",utc_str(tstr,sp->Q.timestamp),sp->Q.gui,LP_aliceids,sp->method,(long long)sp->aliceid,dstr(sp->Q.satoshis),sp->Q.srccoin,dstr(sp->Q.destsatoshis),sp->Q.destcoin,sp->qprice); + sprintf(line,"%s %8s %-4d %9s swap.%016llx: (%.8f %5s) -> (%.8f %5s) qprice %.8f",utc_str(tstr,sp->Q.timestamp),sp->Q.gui,sp->ind,sp->method,(long long)sp->aliceid,dstr(sp->Q.satoshis),sp->Q.srccoin,dstr(sp->Q.destsatoshis),sp->Q.destcoin,sp->qprice); } int32_t LP_statslog_parsequote(char *method,cJSON *lineobj) @@ -122,9 +123,9 @@ int32_t LP_statslog_parsequote(char *method,cJSON *lineobj) { sp->Q = Q; sp->qprice = qprice; + sp->ind = LP_aliceids++; LP_swapstats_line(line,sp); printf("%s\n",line); - LP_aliceids++; } else printf("unexpected LP_swapstats_add failure\n"); } }