Browse Source

Test

etomic
jl777 7 years ago
parent
commit
e5f7f66723
  1. 2
      iguana/exchanges/LP_RTmetrics.c
  2. 2
      iguana/exchanges/LP_ordermatch.c
  3. 6
      iguana/exchanges/LP_transaction.c

2
iguana/exchanges/LP_RTmetrics.c

@ -175,7 +175,7 @@ void LP_RTmetrics_update(char *base,char *rel)
char str[65]; printf("%s has %d pending swaps! which is more than %d\n",bits256_str(str,LP_RTmetrics.pending_pubkeys[i]),LP_RTmetrics.pending_swaps[i],LP_MAXPENDING_SWAPS); char str[65]; printf("%s has %d pending swaps! which is more than %d\n",bits256_str(str,LP_RTmetrics.pending_pubkeys[i]),LP_RTmetrics.pending_swaps[i],LP_MAXPENDING_SWAPS);
LP_RTmetrics_blacklistadd(LP_RTmetrics.pending_pubkeys[i]); LP_RTmetrics_blacklistadd(LP_RTmetrics.pending_pubkeys[i]);
} }
printf("%d pubkeys have pending swaps, whitelist.%d blacklist.%d avoidtxids.%d\n",LP_RTmetrics.numpendings,LP_RTmetrics.numwhitelist,LP_RTmetrics.numblacklist,LP_RTmetrics.numavoidtxids); //printf("%d pubkeys have pending swaps, whitelist.%d blacklist.%d avoidtxids.%d\n",LP_RTmetrics.numpendings,LP_RTmetrics.numwhitelist,LP_RTmetrics.numblacklist,LP_RTmetrics.numavoidtxids);
} }
double _LP_RTmetric_calc(struct LP_metricinfo *mp,double bestprice,double maxprice,double relvolume) double _LP_RTmetric_calc(struct LP_metricinfo *mp,double bestprice,double maxprice,double relvolume)

2
iguana/exchanges/LP_ordermatch.c

@ -915,7 +915,7 @@ char *LP_autobuy(void *ctx,char *myipaddr,int32_t mypubsock,char *base,char *rel
{ {
destsatoshis -= 2*desttxfee; destsatoshis -= 2*desttxfee;
autxo->S.satoshis = destsatoshis; autxo->S.satoshis = destsatoshis;
printf("first path dest %.8f from %.8f\n",dstr(destsatoshis),dstr(autxo->S.satoshis)); //printf("first path dest %.8f from %.8f\n",dstr(destsatoshis),dstr(autxo->S.satoshis));
} }
else if ( autxo->S.satoshis - 2*desttxfee < destsatoshis ) else if ( autxo->S.satoshis - 2*desttxfee < destsatoshis )
{ {

6
iguana/exchanges/LP_transaction.c

@ -643,10 +643,10 @@ char *basilisk_swap_bobtxspend(bits256 *signedtxidp,uint64_t txfee,char *name,ch
{ {
if ( value < satoshis+txfee ) if ( value < satoshis+txfee )
{ {
if ( satoshis > value-txfee/2 ) if ( (value-satoshis) > 3*txfee/4 )
{ {
satoshis = value - txfee; satoshis = value - 3*txfee/4;
printf("reduce satoshis by txfee %.8f to %.8f\n",dstr(txfee),dstr(satoshis)); printf("reduce satoshis %.8f by txfee %.8f to value %.8f\n",dstr(satoshis),dstr(txfee),dstr(value));
} }
else else
{ {

Loading…
Cancel
Save