aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net.cpp4
-rw-r--r--src/net.h4
-rw-r--r--src/rpc/net.cpp4
3 files changed, 8 insertions, 4 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 57b8844d6b..504619dec5 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1217,7 +1217,6 @@ bool CConnman::AddConnection(const std::string& address, ConnectionType conn_typ
switch (conn_type) {
case ConnectionType::INBOUND:
case ConnectionType::MANUAL:
- case ConnectionType::FEELER:
return false;
case ConnectionType::OUTBOUND_FULL_RELAY:
max_connections = m_max_outbound_full_relay;
@@ -1228,6 +1227,9 @@ bool CConnman::AddConnection(const std::string& address, ConnectionType conn_typ
// no limit for ADDR_FETCH because -seednode has no limit either
case ConnectionType::ADDR_FETCH:
break;
+ // no limit for FEELER connections since they're short-lived
+ case ConnectionType::FEELER:
+ break;
} // no default case, so the compiler can warn about missing cases
// Count existing connections
diff --git a/src/net.h b/src/net.h
index 28cd635976..81004a203c 100644
--- a/src/net.h
+++ b/src/net.h
@@ -892,8 +892,8 @@ public:
* Attempts to open a connection. Currently only used from tests.
*
* @param[in] address Address of node to try connecting to
- * @param[in] conn_type ConnectionType::OUTBOUND or ConnectionType::BLOCK_RELAY
- * or ConnectionType::ADDR_FETCH
+ * @param[in] conn_type ConnectionType::OUTBOUND, ConnectionType::BLOCK_RELAY,
+ * ConnectionType::ADDR_FETCH or ConnectionType::FEELER
* @return bool Returns false if there are no available
* slots for this connection:
* - conn_type not a supported ConnectionType
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 861b889118..4ef44a93db 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -343,7 +343,7 @@ static RPCHelpMan addconnection()
"\nOpen an outbound connection to a specified node. This RPC is for testing only.\n",
{
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The IP address and port to attempt connecting to."},
- {"connection_type", RPCArg::Type::STR, RPCArg::Optional::NO, "Type of connection to open (\"outbound-full-relay\", \"block-relay-only\" or \"addr-fetch\")."},
+ {"connection_type", RPCArg::Type::STR, RPCArg::Optional::NO, "Type of connection to open (\"outbound-full-relay\", \"block-relay-only\", \"addr-fetch\" or \"feeler\")."},
},
RPCResult{
RPCResult::Type::OBJ, "", "",
@@ -371,6 +371,8 @@ static RPCHelpMan addconnection()
conn_type = ConnectionType::BLOCK_RELAY;
} else if (conn_type_in == "addr-fetch") {
conn_type = ConnectionType::ADDR_FETCH;
+ } else if (conn_type_in == "feeler") {
+ conn_type = ConnectionType::FEELER;
} else {
throw JSONRPCError(RPC_INVALID_PARAMETER, self.ToString());
}