diff --git a/docs/COMMAND_LINE.MD b/docs/COMMAND_LINE.MD index 37f90a2..f7e2b4f 100644 --- a/docs/COMMAND_LINE.MD +++ b/docs/COMMAND_LINE.MD @@ -17,8 +17,8 @@ --no-cache Disable p2pool.cache --no-color Disable colors in console output --no-randomx Disable internal RandomX hasher: p2pool will use RPC calls to monerod to check PoW hashes ---out-peers N Maximum number of outgoing connections for p2p server (any value between 10 and 1000) ---in-peers N Maximum number of incoming connections for p2p server (any value between 10 and 1000) +--out-peers N Maximum number of outgoing connections for p2p server (any value between 10 and 450) +--in-peers N Maximum number of incoming connections for p2p server (any value between 10 and 450) --start-mining N Start built-in miner using N threads (any value between 1 and 64) --mini Connect to p2pool-mini sidechain. Note that it will also change default p2p port from 37889 to 37888 --no-autodiff Disable automatic difficulty adjustment for miners connected to stratum diff --git a/src/main.cpp b/src/main.cpp index f31db65..5409967 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -42,8 +42,8 @@ void p2pool_usage() "--no-cache Disable p2pool.cache\n" "--no-color Disable colors in console output\n" "--no-randomx Disable internal RandomX hasher: p2pool will use RPC calls to monerod to check PoW hashes\n" - "--out-peers N Maximum number of outgoing connections for p2p server (any value between 10 and 1000)\n" - "--in-peers N Maximum number of incoming connections for p2p server (any value between 10 and 1000)\n" + "--out-peers N Maximum number of outgoing connections for p2p server (any value between 10 and 450)\n" + "--in-peers N Maximum number of incoming connections for p2p server (any value between 10 and 450)\n" "--start-mining N Start built-in miner using N threads (any value between 1 and 64)\n" "--mini Connect to p2pool-mini sidechain. Note that it will also change default p2p port from %d to %d\n" "--no-autodiff Disable automatic difficulty adjustment for miners connected to stratum\n" diff --git a/src/p2p_server.h b/src/p2p_server.h index d57c45d..0ad9a7e 100644 --- a/src/p2p_server.h +++ b/src/p2p_server.h @@ -141,8 +141,8 @@ public: uint32_t max_outgoing_peers() const { return m_maxOutgoingPeers; } uint32_t max_incoming_peers() const { return m_maxIncomingPeers; } - void set_max_outgoing_peers(uint32_t n) { m_maxOutgoingPeers = std::min(std::max(n, 10U), 1000U); } - void set_max_incoming_peers(uint32_t n) { m_maxIncomingPeers = std::min(std::max(n, 10U), 1000U); } + void set_max_outgoing_peers(uint32_t n) { m_maxOutgoingPeers = std::min(std::max(n, 10U), 450U); } + void set_max_incoming_peers(uint32_t n) { m_maxIncomingPeers = std::min(std::max(n, 10U), 450U); } int deserialize_block(const uint8_t* buf, uint32_t size); const PoolBlock* get_block() const { return m_block; } diff --git a/src/params.cpp b/src/params.cpp index 724d2cb..fc09195 100644 --- a/src/params.cpp +++ b/src/params.cpp @@ -106,12 +106,12 @@ Params::Params(int argc, char* argv[]) } if ((strcmp(argv[i], "--out-peers") == 0) && (i + 1 < argc)) { - m_maxOutgoingPeers = std::min(std::max(strtoul(argv[++i], nullptr, 10), 10UL), 1000UL); + m_maxOutgoingPeers = std::min(std::max(strtoul(argv[++i], nullptr, 10), 10UL), 450UL); ok = true; } if ((strcmp(argv[i], "--in-peers") == 0) && (i + 1 < argc)) { - m_maxIncomingPeers = std::min(std::max(strtoul(argv[++i], nullptr, 10), 10UL), 1000UL); + m_maxIncomingPeers = std::min(std::max(strtoul(argv[++i], nullptr, 10), 10UL), 450UL); ok = true; } diff --git a/src/params.h b/src/params.h index 1f34709..e5c0934 100644 --- a/src/params.h +++ b/src/params.h @@ -45,7 +45,7 @@ struct Params bool m_disableRandomX = true; #endif uint32_t m_maxOutgoingPeers = 10; - uint32_t m_maxIncomingPeers = 1000; + uint32_t m_maxIncomingPeers = 450; uint32_t m_minerThreads = 0; bool m_mini = false; bool m_autoDiff = true;