aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/protocol.h
diff options
context:
space:
mode:
authorAmiti Uttarwar <amiti@uttarwar.org>2020-06-02 09:46:41 -0700
committerAmiti Uttarwar <amiti@uttarwar.org>2021-01-07 10:15:56 -0800
commit5bc04e8837c0452923cebd1b823a85e5c4dcdfa6 (patch)
tree53e4946c569cd17b054d7dc57854001f3630f569 /src/rpc/protocol.h
parentb6a71b80d28c79796b557cdb6bae05abb34d1225 (diff)
[rpc/net] Introduce addconnection to test outbounds & blockrelay
Add a new RPC endpoint to enable opening outbound connections from the tests. The functional test framework currently uses the addnode RPC, which has different behavior than general outbound peers. These changes enable creating both full-relay and block-relay-only connections. The new RPC endpoint calls through to a newly introduced AddConnection method on CConnman that ensures we stay within the allocated max.
Diffstat (limited to 'src/rpc/protocol.h')
-rw-r--r--src/rpc/protocol.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rpc/protocol.h b/src/rpc/protocol.h
index d1475f452d..c8ceb2c186 100644
--- a/src/rpc/protocol.h
+++ b/src/rpc/protocol.h
@@ -62,6 +62,7 @@ enum RPCErrorCode
RPC_CLIENT_NODE_NOT_CONNECTED = -29, //!< Node to disconnect not found in connected nodes
RPC_CLIENT_INVALID_IP_OR_SUBNET = -30, //!< Invalid IP/Subnet
RPC_CLIENT_P2P_DISABLED = -31, //!< No valid connection manager instance found
+ RPC_CLIENT_NODE_CAPACITY_REACHED= -34, //!< Max number of outbound or block-relay connections already open
//! Chain errors
RPC_CLIENT_MEMPOOL_DISABLED = -33, //!< No mempool instance found