Browse Source

Test

etomic
jl777 7 years ago
parent
commit
bebb405ca8
  1. 2
      iguana/exchanges/LP_ordermatch.c
  2. 4
      iguana/exchanges/LP_prices.c

2
iguana/exchanges/LP_ordermatch.c

@ -247,7 +247,7 @@ void LP_notify_pubkeys(void *ctx,int32_t pubsock)
char *LP_postedprice(cJSON *argjson) char *LP_postedprice(cJSON *argjson)
{ {
bits256 pubkey; double price; char *base,*rel; bits256 pubkey; double price; char *base,*rel;
printf("PRICE POSTED.(%s)\n",jprint(argjson,0)); //printf("PRICE POSTED.(%s)\n",jprint(argjson,0));
if ( (base= jstr(argjson,"base")) != 0 && (rel= jstr(argjson,"rel")) != 0 && (price= jdouble(argjson,"price")) > SMALLVAL ) if ( (base= jstr(argjson,"base")) != 0 && (rel= jstr(argjson,"rel")) != 0 && (price= jdouble(argjson,"price")) > SMALLVAL )
{ {
pubkey = jbits256(argjson,"pubkey"); pubkey = jbits256(argjson,"pubkey");

4
iguana/exchanges/LP_prices.c

@ -773,9 +773,9 @@ char *LP_orderbook(char *base,char *rel,int32_t duration)
jaddi(array,LP_orderbookjson(rel,bids[i])); jaddi(array,LP_orderbookjson(rel,bids[i]));
if ( bids[i]->numutxos == 0 )//|| relcoin->electrum == 0 ) if ( bids[i]->numutxos == 0 )//|| relcoin->electrum == 0 )
{ {
LP_address(relcoin,bids[i]->coinaddr);
if ( relcoin->electrum == 0 ) if ( relcoin->electrum == 0 )
LP_listunspent_issue(rel,bids[i]->coinaddr); LP_listunspent_issue(rel,bids[i]->coinaddr);
else LP_address(relcoin,bids[i]->coinaddr);
n++; n++;
} }
free(bids[i]); free(bids[i]);
@ -791,9 +791,9 @@ char *LP_orderbook(char *base,char *rel,int32_t duration)
jaddi(array,LP_orderbookjson(base,asks[i])); jaddi(array,LP_orderbookjson(base,asks[i]));
if ( asks[i]->numutxos == 0 )//|| basecoin->electrum == 0 ) if ( asks[i]->numutxos == 0 )//|| basecoin->electrum == 0 )
{ {
LP_address(basecoin,asks[i]->coinaddr);
if ( basecoin->electrum == 0 ) if ( basecoin->electrum == 0 )
LP_listunspent_issue(base,asks[i]->coinaddr); LP_listunspent_issue(base,asks[i]->coinaddr);
else LP_address(basecoin,asks[i]->coinaddr);
n++; n++;
} }
free(asks[i]); free(asks[i]);

Loading…
Cancel
Save