Browse Source

Test

etomic
jl777 7 years ago
parent
commit
30ddc8b189
  1. 3
      iguana/exchanges/LP_nativeDEX.c
  2. 6
      iguana/exchanges/LP_stats.c

3
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

6
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;

Loading…
Cancel
Save