diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 4b7dc9e5b..2dd574410 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -19,10 +19,11 @@ // // new features: // stats -// multidimensional portfolio +// multidimensional portfolio, percentage among active vs all // autoutxo // bugs: +// getutxos lastn field // false detection of bobreclaim // unduplicated bugs: diff --git a/iguana/exchanges/LP_prices.c b/iguana/exchanges/LP_prices.c index 4bc86796b..874a257e9 100644 --- a/iguana/exchanges/LP_prices.c +++ b/iguana/exchanges/LP_prices.c @@ -792,14 +792,14 @@ void LP_pricefeedupdate(bits256 pubkey,char *base,char *rel,double price) { struct LP_priceinfo *basepp,*relpp; uint32_t now; uint64_t price64; struct LP_pubkeyinfo *pubp; char str[65],fname[512]; FILE *fp; //printf("check PRICEFEED UPDATE.(%s/%s) %.8f %s\n",base,rel,price,bits256_str(str,pubkey)); - if ( price > SMALLVAL && (basepp= LP_priceinfofind(base)) != 0 && (relpp= LP_priceinfofind(rel)) != 0 ) + if ( price > SMALLVAL && isnan(price) == 0 && price < SATOSHIDEN && (basepp= LP_priceinfofind(base)) != 0 && (relpp= LP_priceinfofind(rel)) != 0 ) { if ( (fp= basepp->fps[relpp->ind]) == 0 ) { LP_pricefname(fname,base,rel); fp = basepp->fps[relpp->ind] = OS_appendfile(fname); } - if ( fp != 0 && price > SMALLVAL && isnan(price) == 0 && price < SATOSHIDEN ) + if ( fp != 0 ) { now = (uint32_t)time(NULL); price64 = price * SATOSHIDEN; @@ -812,7 +812,7 @@ void LP_pricefeedupdate(bits256 pubkey,char *base,char *rel,double price) sprintf(fname,"%s/PRICES/%s_%s",GLOBAL_DBDIR,rel,base); fp = relpp->fps[basepp->ind] = OS_appendfile(fname); } - if ( fp != 0 && price > SMALLVAL && isnan(price) == 0 && price < SATOSHIDEN ) + if ( fp != 0 ) { now = (uint32_t)time(NULL); price64 = (1. / price) * SATOSHIDEN; diff --git a/iguana/exchanges/LP_utxos.c b/iguana/exchanges/LP_utxos.c index 8ba54a616..b49efddb6 100644 --- a/iguana/exchanges/LP_utxos.c +++ b/iguana/exchanges/LP_utxos.c @@ -359,7 +359,7 @@ char *LP_utxos(int32_t iambob,struct LP_peerinfo *mypeer,char *symbol,int32_t la if ( lastn >= n ) firsti = -1; else firsti = (lastn - n); - //printf("LP_utxos iambob.%d symbol.%s firsti.%d lastn.%d\n",iambob,symbol==0?"":symbol,firsti,lastn); + printf("LP_utxos iambob.%d symbol.%s firsti.%d lastn.%d\n",iambob,symbol==0?"":symbol,firsti,lastn); HASH_ITER(hh,LP_utxoinfos[iambob],utxo,tmp) { //char str[65]; printf("check %s.%s\n",utxo->coin,bits256_str(str,utxo->payment.txid));