jl777 7 years ago
parent
commit
de314d2780
  1. 8
      iguana/exchanges/LP_ordermatch.c
  2. 2
      iguana/exchanges/LP_rpc.c

8
iguana/exchanges/LP_ordermatch.c

@ -71,12 +71,14 @@ uint64_t LP_txfeecalc(struct iguana_info *coin,uint64_t txfee,int32_t txlen)
if ( txlen == 0 ) if ( txlen == 0 )
txlen = LP_AVETXSIZE; txlen = LP_AVETXSIZE;
coin->rate = LP_getestimatedrate(coin); coin->rate = LP_getestimatedrate(coin);
if ( (txfee= SATOSHIDEN * coin->rate * txlen) <= 10000 ) if ( coin->electrum == 0 )
coin->rate *= 1.25;
if ( (txfee= SATOSHIDEN * coin->rate * txlen) <= 20000 )
{ {
//coin->rate = -1.; //coin->rate = -1.;
coin->rate = _LP_getestimatedrate(coin); coin->rate = _LP_getestimatedrate(coin);
if ( (txfee= SATOSHIDEN * coin->rate * txlen) <= 10000 ) if ( (txfee= SATOSHIDEN * coin->rate * txlen) <= 20000 )
txfee = 10000; txfee = 20000;
} }
} else txfee = coin->txfee; } else txfee = coin->txfee;
if ( txfee < LP_MIN_TXFEE ) if ( txfee < LP_MIN_TXFEE )

2
iguana/exchanges/LP_rpc.c

@ -689,8 +689,6 @@ again:
//rate *= 1.25; //rate *= 1.25;
if ( rate < 0.00000005 ) if ( rate < 0.00000005 )
rate = 0.00000005; rate = 0.00000005;
if ( coin->electrum == 0 )
rate *= 1.25;
if ( fabs(rate - coin->rate) > SMALLVAL ) if ( fabs(rate - coin->rate) > SMALLVAL )
printf("%u t%u estimated rate.(%s) (%s) -> %.8f %.8f\n",(uint32_t)time(NULL),coin->ratetime,coin->symbol,retstr,rate,coin->rate); printf("%u t%u estimated rate.(%s) (%s) -> %.8f %.8f\n",(uint32_t)time(NULL),coin->ratetime,coin->symbol,retstr,rate,coin->rate);
coin->rate = rate; coin->rate = rate;

Loading…
Cancel
Save