diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 8db037e1e..95b94fdd2 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -135,7 +135,7 @@ void LP_mainloop(struct LP_peerinfo *mypeer,uint16_t mypubport,int32_t pubsock,i portable_mutex_lock(&LP_commandmutex); if ( (retstr= stats_JSON(argjson,"127.0.0.1",0)) != 0 ) { - printf("%s RECV.[%d] %s\n",peer->ipaddr,recvsize,(char *)ptr); + //printf("%s RECV.[%d] %s\n",peer->ipaddr,recvsize,(char *)ptr); free(retstr); } portable_mutex_unlock(&LP_commandmutex); @@ -195,7 +195,7 @@ void LP_mainloop(struct LP_peerinfo *mypeer,uint16_t mypubport,int32_t pubsock,i portable_mutex_lock(&LP_commandmutex); if ( (retstr= stats_JSON(argjson,"127.0.0.1",0)) != 0 ) { - printf("%s RECV.[%d] %s\n",peer->ipaddr,recvsize,(char *)ptr); + //printf("%s RECV.[%d] %s\n",peer->ipaddr,recvsize,(char *)ptr); free(retstr); } portable_mutex_unlock(&LP_commandmutex); @@ -216,7 +216,7 @@ void LP_mainloop(struct LP_peerinfo *mypeer,uint16_t mypubport,int32_t pubsock,i { if ( (retstr= stats_JSON(argjson,"127.0.0.1",0)) != 0 ) { - printf("%s RECV.[%d] %s\n",peer->ipaddr,recvsize,(char *)ptr); + //printf("%s RECV.[%d] %s\n",peer->ipaddr,recvsize,(char *)ptr); free(retstr); } } diff --git a/iguana/exchanges/LP_prices.c b/iguana/exchanges/LP_prices.c index aa3df855b..b18794fe7 100644 --- a/iguana/exchanges/LP_prices.c +++ b/iguana/exchanges/LP_prices.c @@ -288,11 +288,11 @@ static int _cmp_orderbookrev(const void *a,const void *b) cJSON *LP_orderbookjson(struct LP_cacheinfo *ptr,int32_t polarity) { - double price,volume; cJSON *item = cJSON_CreateObject(); - if ( (price= ptr->price) != 0. && (volume= dstr(ptr->Q.satoshis)) != 0. ) + double price; cJSON *item = cJSON_CreateObject(); + if ( (price= ptr->price) != 0. ) { jaddnum(item,"price",polarity > 0 ? price : 1. / price); - jaddnum(item,"volume",polarity > 0 ? volume : volume / price); + jaddnum(item,"volume",polarity > 0 ? dstr(ptr->Q.satoshis) : dstr(ptr->Q.destsatoshis)); jaddbits256(item,"txid",ptr->Q.txid); jaddnum(item,"vout",ptr->Q.vout); } @@ -323,13 +323,13 @@ char *LP_orderbook(char *base,char *rel) if ( numbids > 1 ) qsort(bids,numbids,sizeof(*bids),_cmp_orderbook); for (i=0; i 1 ) qsort(asks,numasks,sizeof(*asks),_cmp_orderbookrev); for (i=0; i