From beecd13a1016f2e948dc699edaf22f1cb38a0bdd Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 5 Nov 2017 00:45:52 +0200 Subject: [PATCH] test --- iguana/exchanges/LP_include.h | 4 ++-- iguana/exchanges/LP_peers.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_include.h b/iguana/exchanges/LP_include.h index e17bb5baa..29c06f6ba 100644 --- a/iguana/exchanges/LP_include.h +++ b/iguana/exchanges/LP_include.h @@ -44,8 +44,8 @@ void emscripten_usleep(int32_t x); // returns immediate, no sense for sleeping #define LP_ELECTRUM_MAXERRORS 777 #define LP_MEMPOOL_TIMEINCR 10 -#define LP_OPTIONAL_PEERS 16 -#define LP_MAX_PEERS 100 +#define LP_MIN_PEERS 8 +#define LP_MAX_PEERS 32 // RTmetrics #define LP_RTMETRICS_TOPGROUP 1.01 diff --git a/iguana/exchanges/LP_peers.c b/iguana/exchanges/LP_peers.c index 04ee5331e..9412ae298 100644 --- a/iguana/exchanges/LP_peers.c +++ b/iguana/exchanges/LP_peers.c @@ -222,7 +222,7 @@ int32_t LP_peersparse(struct LP_peerinfo *mypeer,int32_t mypubsock,char *destipa if ( (peer= LP_peerfind(argipbits,argport)) == 0 ) { numpeers = LP_numpeers(); - if ( IAMLP != 0 || numpeers < LP_OPTIONAL_PEERS || (IAMLP == 0 && (rand() % LP_MAX_PEERS) > numpeers) ) + if ( IAMLP != 0 || numpeers < LP_MIN_PEERS || (IAMLP == 0 && (rand() % LP_MAX_PEERS) > numpeers) ) peer = LP_addpeer(mypeer,mypubsock,argipaddr,argport,pushport,subport,jint(item,"numpeers"),jint(item,"numutxos"),juint(item,"session")); } if ( peer != 0 )