Browse Source

test

etomic
jl777 7 years ago
parent
commit
beecd13a10
  1. 4
      iguana/exchanges/LP_include.h
  2. 2
      iguana/exchanges/LP_peers.c

4
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_ELECTRUM_MAXERRORS 777
#define LP_MEMPOOL_TIMEINCR 10 #define LP_MEMPOOL_TIMEINCR 10
#define LP_OPTIONAL_PEERS 16 #define LP_MIN_PEERS 8
#define LP_MAX_PEERS 100 #define LP_MAX_PEERS 32
// RTmetrics // RTmetrics
#define LP_RTMETRICS_TOPGROUP 1.01 #define LP_RTMETRICS_TOPGROUP 1.01

2
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 ) if ( (peer= LP_peerfind(argipbits,argport)) == 0 )
{ {
numpeers = LP_numpeers(); 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")); peer = LP_addpeer(mypeer,mypubsock,argipaddr,argport,pushport,subport,jint(item,"numpeers"),jint(item,"numutxos"),juint(item,"session"));
} }
if ( peer != 0 ) if ( peer != 0 )

Loading…
Cancel
Save