aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/net.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2021-08-23 10:42:39 +0100
committerJohn Newbery <john@johnnewbery.com>2021-09-22 16:12:14 +0100
commit0220b834b175dc8c45a2c60213474a72c0ef8193 (patch)
treee3077a9f637e510cf3a388e4badac3ff942164d6 /src/rpc/net.cpp
parentdbcb5742c48fd26f77e500291d7083e12eec741b (diff)
downloadbitcoin-0220b834b175dc8c45a2c60213474a72c0ef8193.tar.xz
[test] Add testing for outbound feeler connections
Extend the addconnection RPC method to allow creating outbound feeler connections. Extend the test framework to accept those feeler connections.
Diffstat (limited to 'src/rpc/net.cpp')
-rw-r--r--src/rpc/net.cpp4
1 files changed, 3 insertions, 1 deletions
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());
}