From 58c9b201a42019966a1329244144c99972dc66d1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 2 Nov 2017 22:30:08 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_include.h | 2 +- iguana/exchanges/LP_ordermatch.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/LP_include.h b/iguana/exchanges/LP_include.h index efce3fe4b..44f92218c 100644 --- a/iguana/exchanges/LP_include.h +++ b/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 diff --git a/iguana/exchanges/LP_ordermatch.c b/iguana/exchanges/LP_ordermatch.c index 6496038b0..2792902c4 100644 --- a/iguana/exchanges/LP_ordermatch.c +++ b/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\"}"));