Browse Source

Test

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

2
iguana/exchanges/LP_commands.c

@ -221,8 +221,6 @@ trust(pubkey, trust)\n\
{
if ( price > SMALLVAL )
{
printf("price set (%s/%s) <- %.8f\n",rel,base,1./price);
LP_mypriceset(&changed,rel,base,1./price);
return(LP_autotrade(ctx,myipaddr,pubsock,base,rel,price,jdouble(argjson,"relvolume"),jint(argjson,"timeout"),jint(argjson,"duration")));
} else return(clonestr("{\"error\":\"no price set\"}"));
}

2
iguana/exchanges/LP_ordermatch.c

@ -662,6 +662,8 @@ struct LP_utxoinfo *LP_bestutxo(double *ordermatchpricep,int64_t *bestsatoshisp,
}
if ( bestutxo == 0 || *ordermatchpricep == 0. || *bestdestsatoshisp == 0 )
return(0);
int32_t changed;
LP_mypriceset(&changed,autxo->coin,base,1. / *ordermatchpricep);
return(bestutxo);
}

4
iguana/exchanges/LP_prices.c

@ -271,9 +271,9 @@ double LP_pricecache(struct LP_quoteinfo *qp,char *base,char *rel,bits256 txid,i
ptr->price = (double)ptr->Q.destsatoshis / ptr->Q.satoshis;
if ( LP_pricevalid(ptr->price) <= 0 )
ptr->price = 0.;
printf("LP_pricecache: set %s/%s ptr->price %.8f\n",base,rel,ptr->price);
//printf("LP_pricecache: set %s/%s ptr->price %.8f\n",base,rel,ptr->price);
}
printf("found %s/%s %.8f\n",base,rel,ptr->price);
//printf("found %s/%s %.8f\n",base,rel,ptr->price);
return(ptr->price);
}
//char str[65]; printf("cachemiss %s/%s %s/v%d\n",base,rel,bits256_str(str,txid),vout);

Loading…
Cancel
Save