From 30ddc8b1897e12692120eddd823383df79751219 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 29 Oct 2017 16:35:35 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 3 --- iguana/exchanges/LP_stats.c | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 7a5afcb82..513b1b93b 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -18,9 +18,6 @@ // LP_nativeDEX.c // marketmaker // -// pricearray? RT metrics -// select oldest utxo first, handles <-> pubkeys, reputations, bonds etc. -// // verify portfolio, interest to KMD withdraw, pricebroadcast loop, trade to pubkey // dPoW security -> 4: KMD notarized, 5: BTC notarized, after next notary elections // bigendian architectures need to use little endian for sighash calcs diff --git a/iguana/exchanges/LP_stats.c b/iguana/exchanges/LP_stats.c index e31cdd6db..1fcea0355 100644 --- a/iguana/exchanges/LP_stats.c +++ b/iguana/exchanges/LP_stats.c @@ -191,7 +191,10 @@ int32_t LP_swapstats_update(struct LP_swapstats *sp,struct LP_quoteinfo *qp,cJSO sp->Apaymentspent = LP_swapstats_txid(lineobj,"Apaymentspent",sp->Apaymentspent); sp->depositspent = LP_swapstats_txid(lineobj,"depositspent",sp->depositspent); if ( (statusstr= jstr(lineobj,"status")) != 0 && strcmp(statusstr,"finished") == 0 ) - sp->finished = juint(lineobj,"timestamp"); + { + if ( (sp->finished= juint(lineobj,"timestamp")) == 0 ) + sp->finished = (uint32_t)time(NULL); + } if ( sp->finished == 0 && time(NULL) > sp->Q.timestamp+INSTANTDEX_LOCKTIME*2 ) sp->expired = (uint32_t)time(NULL); return(0); @@ -231,7 +234,6 @@ int32_t LP_statslog_parsequote(char *method,cJSON *lineobj) quoteid = juint(lineobj,"quoteid"); if ( (sp= LP_swapstats_find(aliceid)) != 0 ) { - flag = 1; sp->methodind = methodind; if ( LP_swapstats_update(sp,&Q,lineobj) == 0 ) flag = 1;