Browse Source

Test

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

2
iguana/exchanges/LP_ordermatch.c

@ -954,7 +954,7 @@ struct LP_utxoinfo *LP_ordermatch_iter(struct LP_address_utxo **utxos,int32_t ma
struct LP_utxoinfo *LP_buyutxo(double *ordermatchpricep,int64_t *bestsatoshisp,int64_t *bestdestsatoshisp,struct LP_utxoinfo *autxo,char *base,double maxprice,int32_t duration,uint64_t txfee,uint64_t desttxfee,char *gui,bits256 *avoids,int32_t numavoids) struct LP_utxoinfo *LP_buyutxo(double *ordermatchpricep,int64_t *bestsatoshisp,int64_t *bestdestsatoshisp,struct LP_utxoinfo *autxo,char *base,double maxprice,int32_t duration,uint64_t txfee,uint64_t desttxfee,char *gui,bits256 *avoids,int32_t numavoids)
{ {
bits256 pubkey; char *obookstr,coinaddr[64]; cJSON *orderbook,*asks,*item; int32_t maxiters,i,j,numasks,max = 10000; struct LP_address_utxo **utxos; double price; struct LP_pubkeyinfo *pubp; uint64_t asatoshis; struct iguana_info *basecoin; struct LP_utxoinfo *bestutxo = 0; bits256 pubkey; char *obookstr,coinaddr[64]; cJSON *orderbook,*asks,*item; int32_t maxiters,i,j,numasks,max = 10000; struct LP_address_utxo **utxos; double price; struct LP_pubkeyinfo *pubp; uint64_t asatoshis; struct iguana_info *basecoin; struct LP_utxoinfo *bestutxo = 0;
maxiters = 100; maxiters = 50;
*ordermatchpricep = 0.; *ordermatchpricep = 0.;
*bestsatoshisp = *bestdestsatoshisp = 0; *bestsatoshisp = *bestdestsatoshisp = 0;
basecoin = LP_coinfind(base); basecoin = LP_coinfind(base);

4
iguana/exchanges/LP_prices.c

@ -666,8 +666,8 @@ cJSON *LP_orderbookjson(char *symbol,struct LP_orderbookentry *op)
jaddstr(item,"address",op->coinaddr); jaddstr(item,"address",op->coinaddr);
jaddnum(item,"price",op->price); jaddnum(item,"price",op->price);
jaddnum(item,"numutxos",op->numutxos); jaddnum(item,"numutxos",op->numutxos);
jaddnum(item,"minvolume",dstr(op->minsatoshis)); jaddnum(item,"minvolume",dstr(op->minsatoshis)*0.8);
jaddnum(item,"maxvolume",dstr(op->maxsatoshis)); jaddnum(item,"maxvolume",dstr(op->maxsatoshis)*0.8);
jaddbits256(item,"pubkey",op->pubkey); jaddbits256(item,"pubkey",op->pubkey);
jaddnum(item,"age",time(NULL)-op->timestamp); jaddnum(item,"age",time(NULL)-op->timestamp);
} }

Loading…
Cancel
Save