aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorMartin Zumsande <mzumsande@gmail.com>2021-05-31 22:49:42 +0200
committerMartin Zumsande <mzumsande@gmail.com>2021-07-12 02:16:45 +0200
commitc34ad3309f93979b274a37de013502b05d25fad8 (patch)
tree003e8754ab4add0aadc72107983134560a6ec851 /src/rpc
parent533500d9072b7d5a36a6491784bdeb9247e91fb0 (diff)
net, rpc: Enable AddrFetch connections for functional testing
Co-authored-by: Amiti Uttarwar <amiti@uttarwar.org>
Diffstat (limited to 'src/rpc')
-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 c4d6e3d546..50280915c3 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -337,7 +337,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, either \"outbound-full-relay\" or \"block-relay-only\"."},
+ {"connection_type", RPCArg::Type::STR, RPCArg::Optional::NO, "Type of connection to open (\"outbound-full-relay\", \"block-relay-only\" or \"addr-fetch\")."},
},
RPCResult{
RPCResult::Type::OBJ, "", "",
@@ -363,6 +363,8 @@ static RPCHelpMan addconnection()
conn_type = ConnectionType::OUTBOUND_FULL_RELAY;
} else if (conn_type_in == "block-relay-only") {
conn_type = ConnectionType::BLOCK_RELAY;
+ } else if (conn_type_in == "addr-fetch") {
+ conn_type = ConnectionType::ADDR_FETCH;
} else {
throw JSONRPCError(RPC_INVALID_PARAMETER, self.ToString());
}