Browse Source

Test

etomic
jl777 7 years ago
parent
commit
4ce3300aad
  1. 2
      iguana/exchanges/LP_include.h
  2. 3
      iguana/exchanges/LP_ordermatch.c
  3. 4
      iguana/exchanges/LP_portfolio.c

2
iguana/exchanges/LP_include.h

@ -485,7 +485,7 @@ int32_t LP_coinbus(uint16_t coin_busport);
int32_t LP_nanomsg_recvs(void *ctx);
int32_t LP_numconfirms(char *symbol,char *coinaddr,bits256 txid,int32_t vout,int32_t mempool);
void LP_aliceid(uint32_t tradeid,uint64_t aliceid,char *event,uint32_t requestid,uint32_t quoteid);
void LP_autoprices_update(char *base,double basevol,char *rel,double relvol);
void LP_autoprices_update(char *method,char *base,double basevol,char *rel,double relvol);
cJSON *LP_cache_transaction(struct iguana_info *coin,bits256 txid,uint8_t *serialized,int32_t len);
cJSON *LP_transaction_fromdata(struct iguana_info *coin,bits256 txid,uint8_t *serialized,int32_t len);
uint64_t LP_RTsmartbalance(struct iguana_info *coin);

3
iguana/exchanges/LP_ordermatch.c

@ -1166,8 +1166,7 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,
LP_requestinit(&Q.R,Q.srchash,Q.desthash,Q.srccoin,Q.satoshis-Q.txfee,Q.destcoin,Q.destsatoshis-Q.desttxfee,Q.timestamp,Q.quotetime,DEXselector);
LP_tradecommand_log(argjson);
printf("%-4d (%-10u %10u) %12s id.%22llu %5s/%-5s %12.8f -> %11.8f price %11.8f | RT.%d %d\n",(uint32_t)time(NULL) % 3600,Q.R.requestid,Q.R.quoteid,method,(long long)Q.aliceid,Q.srccoin,Q.destcoin,dstr(Q.satoshis),dstr(Q.destsatoshis),(double)Q.destsatoshis/Q.satoshis,LP_RTcount,LP_swapscount);
if ( strcmp(method,"request") != 0 )
LP_autoprices_update(Q.srccoin,dstr(Q.satoshis),Q.destcoin,dstr(Q.destsatoshis));
LP_autoprices_update(method,Q.srccoin,dstr(Q.satoshis),Q.destcoin,dstr(Q.destsatoshis));
retval = 1;
aliceid = j64bits(argjson,"aliceid");
qprice = jdouble(argjson,"price");

4
iguana/exchanges/LP_portfolio.c

@ -591,9 +591,9 @@ void LP_autoprice_iter(void *ctx,struct LP_priceinfo *btcpp)
}
}
void LP_autoprices_update(char *base,double basevol,char *rel,double relvol)
void LP_autoprices_update(char *method,char *base,double basevol,char *rel,double relvol)
{
printf("autoprice update %s/%s %.8f\n",base,rel,relvol/basevol);
printf("%s: autoprice update %s/%s %.8f\n",base,rel,relvol/basevol);
}
int32_t LP_autoprice(void *ctx,char *base,char *rel,cJSON *argjson)

Loading…
Cancel
Save