aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortryphe <tryphe@noreply.github.com>2019-05-08 04:34:01 -0400
committerfanquake <fanquake@gmail.com>2020-05-12 17:30:33 +0800
commit25d8264c95eaf98a66df32addb0bf32d795a35bd (patch)
tree945621410409d240770f89e60e68179e0716b5f2 /src
parentad1b7b18177afb2a2d919cef5442e7c35fd7fe1e (diff)
p2p: add MAX_FEELER_CONNECTIONS constant
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp2
-rw-r--r--src/net.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 221cab15f8..18a1ccf7b8 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1879,7 +1879,7 @@ bool AppInitMain(NodeContext& node)
connOptions.m_max_outbound_full_relay = std::min(MAX_OUTBOUND_FULL_RELAY_CONNECTIONS, connOptions.nMaxConnections);
connOptions.m_max_outbound_block_relay = std::min(MAX_BLOCKS_ONLY_CONNECTIONS, connOptions.nMaxConnections-connOptions.m_max_outbound_full_relay);
connOptions.nMaxAddnode = MAX_ADDNODE_CONNECTIONS;
- connOptions.nMaxFeeler = 1;
+ connOptions.nMaxFeeler = MAX_FEELER_CONNECTIONS;
connOptions.nBestHeight = chain_active_height;
connOptions.uiInterface = &uiInterface;
connOptions.m_banman = node.banman.get();
diff --git a/src/net.h b/src/net.h
index 35d442e61f..66aac6f084 100644
--- a/src/net.h
+++ b/src/net.h
@@ -62,6 +62,8 @@ static const int MAX_OUTBOUND_FULL_RELAY_CONNECTIONS = 8;
static const int MAX_ADDNODE_CONNECTIONS = 8;
/** Maximum number of block-relay-only outgoing connections */
static const int MAX_BLOCKS_ONLY_CONNECTIONS = 2;
+/** Maximum number of feeler connections */
+static const int MAX_FEELER_CONNECTIONS = 1;
/** -listen default */
static const bool DEFAULT_LISTEN = true;
/** -upnp default */