jl777 8 years ago
parent
commit
ebd43ac912
  1. 1
      iguana/exchanges/LP_include.h
  2. 1
      iguana/exchanges/LP_nativeDEX.c
  3. 4
      iguana/exchanges/LP_ordermatch.c
  4. 1
      iguana/exchanges/LP_socket.c

1
iguana/exchanges/LP_include.h

@ -312,6 +312,7 @@ uint16_t LP_randpeer(char *destip);
int32_t LP_butxo_findeither(bits256 txid,int32_t vout);
cJSON *LP_listunspent(char *symbol,char *coinaddr);
int32_t LP_gettx_presence(char *symbol,bits256 expectedtxid);
double LP_getestimatedrate(struct iguana_info *coin);
#endif

1
iguana/exchanges/LP_nativeDEX.c

@ -470,6 +470,7 @@ int32_t LP_mainloop_iter(void *ctx,char *myipaddr,struct LP_peerinfo *mypeer,int
continue;
}
coin->lastscanht++;
LP_getestimatedrate(coin);
break;
}
if ( (counter % 6000) == 60 )

4
iguana/exchanges/LP_ordermatch.c

@ -25,7 +25,9 @@ uint64_t LP_txfeecalc(struct iguana_info *coin,uint64_t txfee)
{
if ( strcmp(coin->symbol,"BTC") == 0 )
{
if ( txfee == 0 && (txfee= LP_getestimatedrate(coin) * LP_AVETXSIZE) < LP_MIN_TXFEE )
if ( coin->rate == 0. )
coin->rate = LP_getestimatedrate(coin);
if ( txfee == 0 && (txfee= coin->rate * LP_AVETXSIZE) < LP_MIN_TXFEE )
txfee = LP_MIN_TXFEE;
}
else txfee = coin->txfee;

1
iguana/exchanges/LP_socket.c

@ -685,6 +685,7 @@ int32_t LP_recvfunc(struct electrum_info *ep,char *str,int32_t len)
for (i=0; i<n; i++)
resultjson = jitem(paramsjson,i);
}
LP_getestimatedrate(LP_coinfind(ep->symbol));
}
/*else if ( strcmp(method,"blockchain.address.subscribe") == 0 ) never is called
{

Loading…
Cancel
Save