diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 2abe38779..e5e5040b5 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/iguana/exchanges/LP_ordermatch.c @@ -594,7 +594,7 @@ struct LP_utxoinfo *LP_bestutxo(double *ordermatchpricep,int64_t *bestdestsatosh { if ( bestprice == 0. ) // assumes price ordered asks bestprice = price; - //printf("item.[%d] %s\n",i,jprint(item,0)); + printf("item.[%d] %s\n",i,jprint(item,0)); txid = jbits256(item,"txid"); vout = jint(item,"vout"); vol = jdouble(item,"volume"); @@ -634,10 +634,14 @@ struct LP_utxoinfo *LP_bestutxo(double *ordermatchpricep,int64_t *bestdestsatosh if ( butxo != 0 ) printf("%llu %llu %d %d %d: ",(long long)(vol*SATOSHIDEN),(long long)butxo->S.satoshis,vol*SATOSHIDEN == butxo->S.satoshis,LP_isavailable(butxo) > 0,LP_ismine(butxo) == 0); printf("cant find butxo.%p or value mismatch %.8f != %.8f or bestflag.%d\n",butxo,vol,butxo!=0?dstr(butxo->S.satoshis):0,butxo->T.bestflag); - //if ( (butxo= LP_utxofind(1,txid,vout)) != 0 && (long long)(vol*SATOSHIDEN) == butxo->S.satoshis && LP_isavailable(butxo) > 0 && LP_ismine(butxo) == 0 && butxo->T.bestflag == 0 ) } } else printf("self trading or blacklisted peer\n"); - } else break; + } + else + { + printf("maxprice %.8f vs %.8f\n",maxprice,price); + break; + } } } free_json(orderbook); diff --git a/iguana/exchanges/LP_prices.c b/iguana/exchanges/LP_prices.c index 7995c8cd7..d85e6d29a 100644 --- a/iguana/exchanges/LP_prices.c +++ b/iguana/exchanges/LP_prices.c @@ -584,13 +584,13 @@ char *LP_orderbook(char *base,char *rel,int32_t duration) qsort(bids,numbids,sizeof(*bids),_cmp_orderbook); if ( numasks > 1 ) { - for (i=0; iprice); - printf(" -> "); + //for (i=0; iprice); + //printf(" -> "); qsort(asks,numasks,sizeof(*asks),_cmp_orderbook); - for (i=0; iprice); - printf("sorted asks.%d\n",numasks); + //for (i=0; iprice); + //printf("sorted asks.%d\n",numasks); } for (i=0; i