Browse Source

Test

etomic
jl777 7 years ago
parent
commit
16f1e1b1e8
  1. 4
      iguana/exchanges/LP_ordermatch.c
  2. 2
      iguana/exchanges/LP_socket.c

4
iguana/exchanges/LP_ordermatch.c

@ -911,7 +911,7 @@ struct LP_utxoinfo *LP_buyutxo(double *ordermatchpricep,int64_t *bestsatoshisp,i
else max = LP_MAXDESIRED_UTXOS; else max = LP_MAXDESIRED_UTXOS;
utxos = calloc(max,sizeof(*utxos)); utxos = calloc(max,sizeof(*utxos));
LP_txfees(&txfee,&desttxfee,base,autxo->coin); LP_txfees(&txfee,&desttxfee,base,autxo->coin);
//printf("LP_buyutxo maxprice %.8f relvol %.8f %s/%s %.8f %.8f\n",maxprice,dstr(autxo->S.satoshis),base,autxo->coin,dstr(txfee),dstr(desttxfee)); printf("LP_buyutxo maxprice %.8f relvol %.8f %s/%s %.8f %.8f\n",maxprice,dstr(autxo->S.satoshis),base,autxo->coin,dstr(txfee),dstr(desttxfee));
if ( (obookstr= LP_orderbook(base,autxo->coin,duration)) != 0 ) if ( (obookstr= LP_orderbook(base,autxo->coin,duration)) != 0 )
{ {
if ( (orderbook= cJSON_Parse(obookstr)) != 0 ) if ( (orderbook= cJSON_Parse(obookstr)) != 0 )
@ -932,7 +932,7 @@ struct LP_utxoinfo *LP_buyutxo(double *ordermatchpricep,int64_t *bestsatoshisp,i
continue; continue;
if ( LP_RTmetrics_blacklisted(pubkey) >= 0 ) if ( LP_RTmetrics_blacklisted(pubkey) >= 0 )
continue; continue;
//printf("[%d/%d] %s pubcmp %d price %.8f vs maxprice %.8f asatoshis %.8f\n",i,numasks,jprint(item,0),bits256_cmp(pubkey,G.LP_mypub25519),price,maxprice,dstr(autxo->S.satoshis)); printf("[%d/%d] %s pubcmp %d price %.8f vs maxprice %.8f asatoshis %.8f\n",i,numasks,jprint(item,0),bits256_cmp(pubkey,G.LP_mypub25519),price,maxprice,dstr(autxo->S.satoshis));
if ( LP_pricevalid(price) > 0 && price <= maxprice ) if ( LP_pricevalid(price) > 0 && price <= maxprice )
{ {
if ( bits256_nonz(destpubkey) == 0 ) if ( bits256_nonz(destpubkey) == 0 )

2
iguana/exchanges/LP_socket.c

@ -416,7 +416,7 @@ cJSON *electrum_submit(char *symbol,struct electrum_info *ep,cJSON **retjsonp,ch
{ {
*retjsonp = 0; *retjsonp = 0;
sprintf(stratumreq,"{ \"jsonrpc\":\"2.0\", \"id\": %u, \"method\":\"%s\", \"params\": %s }\n",ep->stratumid,method,params); sprintf(stratumreq,"{ \"jsonrpc\":\"2.0\", \"id\": %u, \"method\":\"%s\", \"params\": %s }\n",ep->stratumid,method,params);
//printf("%s %s",symbol,stratumreq); printf("%s %s",symbol,stratumreq);
memset(ep->buf,0,ep->bufsize); memset(ep->buf,0,ep->bufsize);
sitem = electrum_sitem(ep,stratumreq,timeout,retjsonp); sitem = electrum_sitem(ep,stratumreq,timeout,retjsonp);
/*sitem = (struct stritem *)queueitem(stratumreq); /*sitem = (struct stritem *)queueitem(stratumreq);

Loading…
Cancel
Save