Browse Source

Test

etomic
jl777 8 years ago
parent
commit
b09e4b0634
  1. 6
      iguana/exchanges/LP_ordermatch.c
  2. 2
      iguana/exchanges/LP_rpc.c

6
iguana/exchanges/LP_ordermatch.c

@ -574,9 +574,15 @@ struct LP_utxoinfo *LP_bestutxo(double *ordermatchpricep,int64_t *bestdestsatosh
if ( maxprice <= 0. || LP_priceinfofind(base) == 0 )
return(0);
if ( (desttxfee= LP_getestimatedrate(autxo->coin) * LP_AVETXSIZE) < LP_MIN_TXFEE )
{
printf("dest.%s txfee %.8f\n",autxo->coin,dstr(desttxfee));
desttxfee = LP_MIN_TXFEE;
}
if ( (txfee= LP_getestimatedrate(base) * LP_AVETXSIZE) < LP_MIN_TXFEE )
{
printf("src.%s txfee %.8f\n",base,dstr(txfee));
txfee = LP_MIN_TXFEE;
}
if ( (obookstr= LP_orderbook(base,autxo->coin,duration)) != 0 )
{
if ( (orderbook= cJSON_Parse(obookstr)) != 0 )

2
iguana/exchanges/LP_rpc.c

@ -337,7 +337,7 @@ double LP_getestimatedrate(char *symbol)
if ( retstr[0] != '-' )
{
coin->estimatedrate = rate = atof(retstr) / 1024.;
//printf("estimated rate.(%s) %s -> %.8f\n",symbol,retstr,rate);
printf("estimated rate.(%s) %s -> %.8f\n",symbol,retstr,rate);
}
free(retstr);
}

Loading…
Cancel
Save