Browse Source

Test

etomic
jl777 7 years ago
parent
commit
58c9b201a4
  1. 2
      iguana/exchanges/LP_include.h
  2. 8
      iguana/exchanges/LP_ordermatch.c

2
iguana/exchanges/LP_include.h

@ -38,7 +38,7 @@ void emscripten_usleep(int32_t x); // returns immediate, no sense for sleeping
#define LP_MAGICBITS 8
#define LP_HTTP_TIMEOUT 3 // 1 is too small due to edge cases of time(NULL)
#define LP_AUTOTRADE_TIMEOUT 15
#define LP_AUTOTRADE_TIMEOUT 20
#define ELECTRUM_TIMEOUT 10
#define LP_ELECTRUM_KEEPALIVE 60
#define LP_ELECTRUM_MAXERRORS 777

8
iguana/exchanges/LP_ordermatch.c

@ -887,13 +887,13 @@ char *LP_autobuy(void *ctx,char *myipaddr,int32_t mypubsock,char *base,char *rel
timeout = LP_AUTOTRADE_TIMEOUT;
if ( basecoin->electrum != 0 && relcoin->electrum != 0 )
{
if ( timeout < 3*LP_AUTOTRADE_TIMEOUT )
timeout = 3*LP_AUTOTRADE_TIMEOUT;
if ( timeout < 2*LP_AUTOTRADE_TIMEOUT )
timeout = 2*LP_AUTOTRADE_TIMEOUT;
}
else if ( basecoin->electrum != 0 || relcoin->electrum != 0 )
{
if ( timeout < 2*LP_AUTOTRADE_TIMEOUT )
timeout = 2*LP_AUTOTRADE_TIMEOUT;
if ( timeout < 1.5*LP_AUTOTRADE_TIMEOUT )
timeout = 1.5*LP_AUTOTRADE_TIMEOUT;
}
if ( time(NULL) < Alice_expiration )
return(clonestr("{\"error\":\"only one pending request at a time\"}"));

Loading…
Cancel
Save