From fb12f4dbea6ef629027ce43e5e5ed8920eef60bf Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 31 Oct 2017 14:56:15 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_include.h | 3 ++- iguana/exchanges/LP_prices.c | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/LP_include.h b/iguana/exchanges/LP_include.h index 0f4ad5861..91ccaae0d 100644 --- a/iguana/exchanges/LP_include.h +++ b/iguana/exchanges/LP_include.h @@ -320,7 +320,8 @@ struct LP_pubkeyinfo UT_hash_handle hh; bits256 pubkey; float matrix[LP_MAXPRICEINFOS][LP_MAXPRICEINFOS]; - uint32_t timestamps[LP_MAXPRICEINFOS][LP_MAXPRICEINFOS],timestamp,numerrors; + //uint32_t timestamps[LP_MAXPRICEINFOS][LP_MAXPRICEINFOS]; + uint32_t timestamp,numerrors; int32_t istrusted; uint8_t rmd160[20],sig[65],pubsecp[33],siglen; }; diff --git a/iguana/exchanges/LP_prices.c b/iguana/exchanges/LP_prices.c index 497b22b75..6cc110671 100644 --- a/iguana/exchanges/LP_prices.c +++ b/iguana/exchanges/LP_prices.c @@ -345,7 +345,7 @@ void LP_prices_parse(struct LP_peerinfo *peer,cJSON *obj) { //char str[65]; printf("gotprice %s %s/%s (%d/%d) %.8f\n",bits256_str(str,pubkey),base,rel,basepp->ind,relid,askprice); pubp->matrix[basepp->ind][relid] = askprice; - pubp->timestamps[basepp->ind][relid] = timestamp; + //pubp->timestamps[basepp->ind][relid] = timestamp; if ( (relpp= LP_priceinfofind(rel)) != 0 ) { dxblend(&basepp->relvals[relpp->ind],askprice,0.9); @@ -497,7 +497,7 @@ int32_t LP_mypriceset(int32_t *changedp,char *base,char *rel,double price) { pubp->timestamp = (uint32_t)time(NULL); pubp->matrix[basepp->ind][relpp->ind] = price; - pubp->timestamps[basepp->ind][relpp->ind] = pubp->timestamp; + //pubp->timestamps[basepp->ind][relpp->ind] = pubp->timestamp; //pubp->matrix[relpp->ind][basepp->ind] = (1. / price); } return(0); @@ -741,7 +741,7 @@ int32_t LP_orderbook_utxoentries(uint32_t now,int32_t polarity,char *base,char * bitcoin_address(coinaddr,basecoin->taddr,basecoin->pubtype,pubp->rmd160,sizeof(pubp->rmd160)); minsatoshis = maxsatoshis = n = 0; ap = 0; - if ( (price= pubp->matrix[baseid][relid]) > SMALLVAL && pubp->timestamps[baseid][relid] >= oldest ) + if ( (price= pubp->matrix[baseid][relid]) > SMALLVAL )//&& pubp->timestamps[baseid][relid] >= oldest ) { balance = 0; if ( (ap= LP_addressfind(basecoin,coinaddr)) != 0 ) @@ -1070,7 +1070,7 @@ void LP_pricefeedupdate(bits256 pubkey,char *base,char *rel,double price) if ( fabs(pubp->matrix[basepp->ind][relpp->ind] - price) > SMALLVAL ) { pubp->matrix[basepp->ind][relpp->ind] = price; - pubp->timestamps[basepp->ind][relpp->ind] = pubp->timestamp; + //pubp->timestamps[basepp->ind][relpp->ind] = pubp->timestamp; dxblend(&basepp->relvals[relpp->ind],price,0.9); dxblend(&relpp->relvals[basepp->ind],1. / price,0.9); }