10 #include <chainparams.h> 32 #include <validation.h> 42 "outbound-full-relay (default automatic connections)",
43 "block-relay-only (does not relay transactions or addresses)",
44 "inbound (initiated by the peer)",
45 "manual (added via addnode RPC or -addnode/-connect configuration options)",
46 "addr-fetch (short-lived automatic connection for soliciting addresses)",
47 "feeler (short-lived automatic connection for testing addresses)" 51 "detecting (peer could be v1 or v2)",
52 "v1 (plaintext transport protocol)",
53 "v2 (BIP324 encrypted transport protocol)" 59 "\nReturns the number of connections to other nodes.\n",
81 "\nRequests that a ping be sent to all other nodes, to measure ping time.\n" 82 "Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds.\n" 83 "Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.\n",
111 return servicesNames;
118 "Returns data about each connected network peer as a json array of objects.",
128 {
RPCResult::Type::STR,
"addrbind",
true,
"(ip:port) Bind address of the connection to the peer"},
131 {
RPCResult::Type::NUM,
"mapped_as",
true,
"The AS in the BGP route to the peer used for diversifying\n" 132 "peer selection (only available if the asmap config flag is set)"},
148 {
RPCResult::Type::NUM,
"minping",
true,
"The minimum observed ping time in milliseconds (ms), if any"},
149 {
RPCResult::Type::NUM,
"pingwait",
true,
"The duration in milliseconds (ms) of an outstanding ping (if non-zero)"},
153 {
RPCResult::Type::BOOL,
"bip152_hb_to",
"Whether we selected peer as (compact blocks) high-bandwidth peer"},
154 {
RPCResult::Type::BOOL,
"bip152_hb_from",
"Whether peer selected us as (compact blocks) high-bandwidth peer"},
156 {
RPCResult::Type::NUM,
"presynced_headers",
"The current height of header pre-synchronization with this peer, or -1 if no low-work sync is in progress"},
163 {
RPCResult::Type::BOOL,
"addr_relay_enabled",
"Whether we participate in address relay with this peer"},
164 {
RPCResult::Type::NUM,
"addr_processed",
"The total number of addresses processed, excluding those dropped due to rate limiting"},
165 {
RPCResult::Type::NUM,
"addr_rate_limited",
"The total number of addresses dropped due to rate limiting"},
166 {
RPCResult::Type::ARR,
"permissions",
"Any special permissions that have been granted to this peer",
170 {
RPCResult::Type::NUM,
"minfeefilter",
"The minimum fee rate for transactions this peer accepts"},
174 "When a message type is not listed in this json object, the bytes sent are 0.\n" 175 "Only known message types can appear as keys in the object."}
180 "When a message type is not listed in this json object, the bytes received are 0.\n" 181 "Only known message types can appear as keys in the object and all bytes received\n" 185 "Please note this output is unlikely to be stable in upcoming releases as we iterate to\n" 186 "best capture connection behaviors."},
188 {
RPCResult::Type::STR,
"session_id",
"The session ID for this connection, or \"\" if there is none (\"v2\" transport protocol only).\n"},
202 std::vector<CNodeStats> vstats;
219 obj.
pushKV(
"id", stats.nodeid);
220 obj.
pushKV(
"addr", stats.m_addr_name);
221 if (stats.addrBind.IsValid()) {
222 obj.
pushKV(
"addrbind", stats.addrBind.ToStringAddrPort());
224 if (!(stats.addrLocal.empty())) {
225 obj.
pushKV(
"addrlocal", stats.addrLocal);
228 if (stats.m_mapped_as != 0) {
229 obj.
pushKV(
"mapped_as", uint64_t(stats.m_mapped_as));
239 obj.
pushKV(
"bytessent", stats.nSendBytes);
240 obj.
pushKV(
"bytesrecv", stats.nRecvBytes);
242 obj.
pushKV(
"timeoffset", stats.nTimeOffset);
243 if (stats.m_last_ping_time > 0us) {
244 obj.
pushKV(
"pingtime", Ticks<SecondsDouble>(stats.m_last_ping_time));
246 if (stats.m_min_ping_time < std::chrono::microseconds::max()) {
247 obj.
pushKV(
"minping", Ticks<SecondsDouble>(stats.m_min_ping_time));
252 obj.
pushKV(
"version", stats.nVersion);
256 obj.
pushKV(
"subver", stats.cleanSubVer);
257 obj.
pushKV(
"inbound", stats.fInbound);
258 obj.
pushKV(
"bip152_hb_to", stats.m_bip152_highbandwidth_to);
259 obj.
pushKV(
"bip152_hb_from", stats.m_bip152_highbandwidth_from);
268 obj.
pushKV(
"inflight", heights);
276 obj.
pushKV(
"permissions", permissions);
280 for (
const auto& i : stats.mapSendBytesPerMsgType) {
282 sendPerMsgType.
pushKV(i.first, i.second);
284 obj.
pushKV(
"bytessent_per_msg", sendPerMsgType);
287 for (
const auto& i : stats.mapRecvBytesPerMsgType) {
289 recvPerMsgType.
pushKV(i.first, i.second);
291 obj.
pushKV(
"bytesrecv_per_msg", recvPerMsgType);
294 obj.
pushKV(
"session_id", stats.m_session_id);
307 "\nAttempts to add or remove a node from the addnode list.\n" 308 "Or try a connection to a node once.\n" 309 "Nodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be\n" 310 "full nodes/support SegWit as other outbound peers are (though such peers will not be synced from).\n" +
312 " and are counted separately from the -maxconnections limit.\n",
321 +
HelpExampleRpc(
"addnode",
"\"192.168.0.6:8333\", \"onetry\" true")
325 const std::string
command{request.params[1].get_str()};
327 throw std::runtime_error(
334 const std::string node_arg{request.params[0].get_str()};
336 bool use_v2transport =
self.MaybeArg<
bool>(2).value_or(node_v2transport);
338 if (use_v2transport && !node_v2transport) {
351 if (!connman.
AddNode({node_arg, use_v2transport})) {
370 "\nOpen an outbound connection to a specified node. This RPC is for testing only.\n",
383 HelpExampleCli(
"addconnection",
"\"192.168.0.6:8333\" \"outbound-full-relay\" true")
384 +
HelpExampleRpc(
"addconnection",
"\"192.168.0.6:8333\" \"outbound-full-relay\" true")
389 throw std::runtime_error(
"addconnection is for regression testing (-regtest mode) only.");
392 const std::string address = request.params[0].get_str();
393 const std::string conn_type_in{
TrimString(request.params[1].get_str())};
395 if (conn_type_in ==
"outbound-full-relay") {
397 }
else if (conn_type_in ==
"block-relay-only") {
399 }
else if (conn_type_in ==
"addr-fetch") {
401 }
else if (conn_type_in ==
"feeler") {
406 bool use_v2transport =
self.Arg<
bool>(2);
415 const bool success = connman.
AddConnection(address, conn_type, use_v2transport);
421 info.
pushKV(
"address", address);
422 info.
pushKV(
"connection_type", conn_type_in);
432 "\nImmediately disconnects from the specified peer node.\n" 433 "\nStrictly one out of 'address' and 'nodeid' can be provided to identify the node.\n" 434 "\nTo disconnect by nodeid, either set 'address' to the empty string, or call using the named 'nodeid' argument only.\n",
452 const UniValue &address_arg = request.params[0];
453 const UniValue &id_arg = request.params[1];
478 "\nReturns information about the given added node, or all added nodes\n" 479 "(note that onetry addnodes are not listed here)\n",
512 if (!request.params[0].isNull()) {
515 if (info.m_params.m_added_node == request.params[0].get_str()) {
516 vInfo.assign(1, info);
530 obj.
pushKV(
"addednode", info.m_params.m_added_node);
531 obj.
pushKV(
"connected", info.fConnected);
533 if (info.fConnected) {
535 address.
pushKV(
"address", info.resolvedAddress.ToStringAddrPort());
536 address.
pushKV(
"connected", info.fInbound ?
"inbound" :
"outbound");
539 obj.
pushKV(
"addresses", addresses);
551 "Returns information about network traffic, including bytes in, bytes out,\n" 552 "and current system time.",
583 obj.
pushKV(
"timemillis", TicksSinceEpoch<std::chrono::milliseconds>(SystemClock::now()));
592 obj.
pushKV(
"uploadtarget", outboundLimit);
601 for (
int n = 0; n <
NET_MAX; ++n) {
620 "Returns an object containing various state info regarding P2P networking.\n",
629 {
RPCResult::Type::ARR,
"localservicesnames",
"the services we offer to the network, in human-readable form",
646 {
RPCResult::Type::STR,
"proxy",
"(\"host:port\") the proxy that is used for this network, or empty if none"},
682 obj.
pushKV(
"localrelay", !
node.peerman->IgnoresIncomingTxs());
686 obj.
pushKV(
"networkactive",
node.connman->GetNetworkActive());
700 for (
const std::pair<const CNetAddr, LocalServiceInfo> &item : mapLocalHost)
703 rec.
pushKV(
"address", item.first.ToStringAddr());
704 rec.
pushKV(
"port", item.second.nPort);
705 rec.
pushKV(
"score", item.second.nScore);
709 obj.
pushKV(
"localaddresses", localAddresses);
719 "\nAttempts to add or remove an IP/Subnet from the banned list.\n",
723 {
"bantime",
RPCArg::Type::NUM,
RPCArg::Default{0},
"time in seconds how long (or until when if [absolute] is set) the IP is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)"},
734 std::string strCommand;
735 if (!request.params[1].isNull())
736 strCommand = request.params[1].
get_str();
737 if (strCommand !=
"add" && strCommand !=
"remove") {
745 bool isSubnet =
false;
747 if (request.params[0].get_str().find(
'/') != std::string::npos)
751 const std::optional<CNetAddr> addr{
LookupHost(request.params[0].get_str(),
false)};
752 if (addr.has_value()) {
762 if (strCommand ==
"add")
769 if (!request.params[2].isNull())
770 banTime = request.params[2].getInt<int64_t>();
772 const bool absolute{request.params[3].isNull() ? false : request.params[3].get_bool()};
781 node.connman->DisconnectNode(subNet);
786 node.connman->DisconnectNode(netAddr);
790 else if(strCommand ==
"remove")
792 if (!( isSubnet ? banman.
Unban(subNet) : banman.
Unban(netAddr) )) {
804 "\nList all manually banned IPs/Subnets.\n",
827 const int64_t current_time{
GetTime()};
830 for (
const auto& entry : banMap)
832 const CBanEntry& banEntry = entry.second;
834 rec.
pushKV(
"address", entry.first.ToString());
843 return bannedAddresses;
851 "\nClear all banned IPs.\n",
872 "\nDisable/enable all p2p network activity.\n",
893 "Return known addresses, after filtering for quality and recency.\n" 894 "These can potentially be used to find new peers in the network.\n" 895 "The total number of addresses known to the node may be higher.",
916 +
HelpExampleCli(
"-named getnodeaddresses",
"network=onion count=12")
925 const int count{request.params[0].isNull() ? 1 : request.params[0].getInt<
int>()};
928 const std::optional<Network> network{request.params[1].isNull() ? std::nullopt : std::optional<Network>{
ParseNetwork(request.params[1].get_str())}};
937 for (
const CAddress& addr : vAddr) {
939 obj.
pushKV(
"time", int64_t{TicksSinceEpoch<std::chrono::seconds>(addr.nTime)});
940 obj.
pushKV(
"services", (uint64_t)addr.nServices);
941 obj.
pushKV(
"address", addr.ToStringAddr());
942 obj.
pushKV(
"port", addr.GetPort());
954 "\nAdd the address of a potential peer to the address manager. This RPC is for testing only.\n",
963 {
RPCResult::Type::BOOL,
"success",
"whether the peer address was successfully added to the address manager"},
974 const std::string& addr_string{request.params[0].get_str()};
975 const auto port{request.params[1].getInt<uint16_t>()};
976 const bool tried{request.params[2].isNull() ? false : request.params[2].get_bool()};
979 std::optional<CNetAddr> net_addr{
LookupHost(addr_string,
false)};
982 if (net_addr.has_value()) {
983 CService service{net_addr.value(), port};
985 address.nTime = Now<NodeSeconds>();
988 if (addrman.
Add({address}, address)) {
992 addrman.
Good(address);
997 obj.
pushKV(
"success", success);
1007 "Send a p2p message to a peer specified by id.\n" 1008 "The message type and body must be provided, the message header will be generated.\n" 1009 "This RPC is for testing only.",
1019 const NodeId peer_id{request.params[0].
getInt<int64_t>()};
1020 const std::string& msg_type{request.params[1].get_str()};
1024 auto msg{TryParseHex<unsigned char>(request.params[2].get_str())};
1025 if (!
msg.has_value()) {
1034 msg_ser.
m_type = msg_type;
1055 "\nProvides information about the node's address manager by returning the number of " 1056 "addresses in the `new` and `tried` tables and their sum for all networks.\n",
1061 {
RPCResult::Type::NUM,
"new",
"number of addresses in the new table, which represent potential peers the node has discovered but hasn't yet successfully connected to."},
1062 {
RPCResult::Type::NUM,
"tried",
"number of addresses in the tried table, which represent peers the node has successfully connected to in the past."},
1071 for (
int n = 0; n <
NET_MAX; ++n) {
1075 obj.
pushKV(
"new", addrman.
Size(network,
true));
1076 obj.
pushKV(
"tried", addrman.
Size(network,
false));
1081 obj.
pushKV(
"new", addrman.
Size(std::nullopt,
true));
1082 obj.
pushKV(
"tried", addrman.
Size(std::nullopt,
false));
1084 ret.pushKV(
"all_networks", obj);
1096 ret.pushKV(
"time", int64_t{TicksSinceEpoch<std::chrono::seconds>(info.
nTime)});
1106 for (
const auto& e : tableInfos) {
1109 std::ostringstream key;
1122 "EXPERIMENTAL warning: this call may be changed in future releases.\n" 1123 "\nReturns information on all address manager entries for the new and tried tables.\n",
1128 {
RPCResult::Type::OBJ,
"bucket/position",
"the location in the address manager table (<bucket>/<position>)", {
1177 for (
const auto& c : commands) {
1178 t.appendCommand(c.name, &c);
bool RemoveAddedNode(const std::string &node) EXCLUSIVE_LOCKS_REQUIRED(!m_added_nodes_mutex)
size_t Size(std::optional< Network > net=std::nullopt, std::optional< bool > in_new=std::nullopt) const
Return size information about addrman.
void push_back(UniValue val)
AddrFetch connections are short lived connections used to solicit addresses from peers.
Node has not been added before.
static RPCHelpMan sendmsgtopeer()
const std::vector< std::string > NET_PERMISSIONS_DOC
ServiceFlags
nServices flags
static RPCHelpMan clearbanned()
UniValue AddrmanTableToJSON(const std::vector< std::pair< AddrInfo, AddressPosition >> &tableInfos)
A set of addresses that represent the hash of a string or FQDN.
Max number of outbound or block-relay connections already open.
Dummy value to indicate the number of NET_* constants.
uint64_t m_addr_rate_limited
bool OutboundTargetReached(bool historicalBlockServingLimit) const EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex)
check if the outbound target is reached if param historicalBlockServingLimit is set true...
Feeler connections are short-lived connections made to check that a node is alive.
bool randomize_credentials
const std::string NET_MESSAGE_TYPE_OTHER
std::vector< unsigned char > data
uint64_t GetTotalBytesRecv() const
std::vector< CAddress > GetAddresses(size_t max_addresses, size_t max_pct, std::optional< Network > network, const bool filtered=true) const
Return all or many randomly selected addresses, optionally by network.
bool GetProxy(enum Network net, Proxy &proxyInfoOut)
void RegisterNetRPCCommands(CRPCTable &t)
std::vector< AddedNodeInfo > GetAddedNodeInfo(bool include_connected) const EXCLUSIVE_LOCKS_REQUIRED(!m_added_nodes_mutex)
static UniValue GetNetworksInfo()
static RPCHelpMan addpeeraddress()
static const int MAX_ADDNODE_CONNECTIONS
Maximum number of addnode outgoing nodes.
const std::string & get_str() const
void pushKVEnd(std::string key, UniValue val)
static RPCHelpMan getaddrmaninfo()
bool Contains(Network net) const EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
std::vector< std::string > serviceFlagsToStr(uint64_t flags)
Convert service flags (a bitmask of NODE_*) to human readable strings.
CService MaybeFlipIPv6toCJDNS(const CService &service)
If an IPv6 address belongs to the address range used by the CJDNS network and the CJDNS network is re...
int64_t GetTimeOffset()
"Never go to sea with two chronometers; take one or three." Our three time sources are: ...
Network GetNetClass() const
static RPCHelpMan getnettotals()
These are the default connections that we use to connect with the network.
void GetNodeStats(std::vector< CNodeStats > &vstats) const
std::string ToString() const
std::string ToStringAddrPort() const
AddrMan & EnsureAnyAddrman(const std::any &context)
uint64_t GetMaxOutboundTarget() const EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex)
Invalid, missing or duplicate parameter.
Stochastic address manager.
bool IsBanned(const CNetAddr &net_addr) EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex)
Return whether net_addr is banned.
bool ForNode(NodeId id, std::function< bool(CNode *pnode)> func)
std::string ToStringAddr() const
bool DisconnectNode(const std::string &node)
void Ban(const CNetAddr &net_addr, int64_t ban_time_offset=0, bool since_unix_epoch=false) EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex)
std::string TransportTypeAsString(TransportProtocolType transport_type)
Convert TransportProtocolType enum to a string value.
static RPCHelpMan getpeerinfo()
std::string ToString(const T &t)
Locale-independent version of std::to_string.
Special type that is a STR with only hex chars.
NodeContext struct containing references to chain state and connection state.
std::string HelpExampleRpc(const std::string &methodname, const std::string &args)
CAmount m_fee_filter_received
UniValue JSONRPCError(int code, const std::string &message)
static RPCHelpMan getnodeaddresses()
void ClearBanned() EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex)
bool Add(const std::vector< CAddress > &vAddr, const CNetAddr &source, std::chrono::seconds time_penalty=0s)
Attempt to add one or more addresses to addrman's new table.
Special string with only hex chars.
uint64_t m_addr_processed
We open manual connections to addresses that users explicitly requested via the addnode RPC or the -a...
std::vector< CNetAddr > LookupHost(const std::string &name, unsigned int nMaxSolutions, bool fAllowLookup, DNSLookupFn dns_lookup_function)
Resolve a host string to its corresponding network addresses.
std::string ConnectionTypeAsString(ConnectionType conn_type)
Convert ConnectionType enum to a string value.
ServiceFlags GetLocalServices() const
Used to convey which local services we are offering peers during node connection. ...
A combination of a network address (CNetAddr) and a (TCP) port.
Extended statistics about a CAddress.
void OpenNetworkConnection(const CAddress &addrConnect, bool fCountFailure, CSemaphoreGrant &&grant_outbound, const char *strDest, ConnectionType conn_type, bool use_v2transport) EXCLUSIVE_LOCKS_REQUIRED(!m_unused_i2p_sessions_mutex)
static RPCHelpMan disconnectnode()
A CService with information about it as peer.
const std::string CURRENCY_UNIT
static RPCHelpMan setban()
static RPCHelpMan addnode()
static const int PROTOCOL_VERSION
network protocol versioning
General application defined errors.
std::string DefaultHint
Hint for default value.
void SetNetworkActive(bool active)
bool GetNetworkActive() const
NodeSeconds nTime
Always included in serialization. The behavior is unspecified if the value is not representable as ui...
std::string HelpExampleCli(const std::string &methodname, const std::string &args)
std::string strSubVersion
Subversion as sent to the P2P network in version messages.
Special numeric to denote unix epoch time.
static RPCHelpMan setnetworkactive()
std::vector< std::string > GetNetworkNames(bool append_unroutable)
Return a vector of publicly routable Network names; optionally append NET_UNROUTABLE.
constexpr int64_t count_seconds(std::chrono::seconds t)
std::chrono::microseconds m_ping_wait
enum Network ParseNetwork(const std::string &net_in)
const std::vector< std::string > CONNECTION_TYPE_DOC
CNetAddr source
where knowledge about this address first came from
std::chrono::seconds GetMaxOutboundTimeLeftInCycle() const EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex)
ServiceFlags their_services
size_t GetNodeCount(ConnectionDirection) const
ServiceFlags nServices
Serialized as uint64_t in V1, and as CompactSize in V2.
ChainType GetChainType() const
Return the chain type.
bilingual_str GetWarnings(bool verbose)
Format a string that describes several potential problems detected by the core.
virtual bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) const =0
Get statistics from node state.
void PushMessage(CNode *pnode, CSerializedNetMsg &&msg) EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex)
virtual void SendPings()=0
Send ping message to all peers.
uint64_t GetTotalBytesSent() const EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex)
const CChainParams & Params()
Return the currently selected parameters.
void pushKV(std::string key, UniValue val)
auto Join(const C &container, const S &separator, UnaryOp unary_op)
Join all container items.
static UniValue GetServicesNames(ServiceFlags services)
Returns, given services flags, a list of humanly readable (known) network services.
GlobalMutex g_maplocalhost_mutex
UniValue AddrmanEntryToJSON(const AddrInfo &info)
BanMan & EnsureAnyBanman(const std::any &context)
static RPCHelpMan getnetworkinfo()
Node to disconnect not found in connected nodes.
std::chrono::seconds GetMaxOutboundTimeframe() const
UniValue ValueFromAmount(const CAmount amount)
static RPCHelpMan getaddednodeinfo()
bool AddNode(const AddedNodeParams &add) EXCLUSIVE_LOCKS_REQUIRED(!m_added_nodes_mutex)
ConnectionType
Different types of connections to a peer.
PeerManager & EnsurePeerman(const NodeContext &node)
static RPCHelpMan getconnectioncount()
std::map< CSubNet, CBanEntry > banmap_t
const std::vector< std::string > TRANSPORT_TYPE_DOC
static RPCHelpMan listbanned()
Location information for an address in AddrMan.
std::string GetNetworkName(enum Network net)
Information about a peer.
std::vector< int > vHeightInFlight
Special dictionary with keys that are not literals.
void GetBanned(banmap_t &banmap) EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex)
bool Good(const CService &addr, NodeSeconds time=Now< NodeSeconds >())
Mark an address record as accessible and attempt to move it to addrman's tried table.
int64_t GetTime()
DEPRECATED, see GetTime.
std::string TrimString(std::string_view str, std::string_view pattern=" \\\)
static const int CLIENT_VERSION
bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
static path absolute(const path &p)
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate...
std::vector< std::pair< AddrInfo, AddressPosition > > GetEntries(bool from_tried) const
Returns an information-location pair for all addresses in the selected addrman table.
bool m_addr_relay_enabled
bool Unban(const CNetAddr &net_addr) EXCLUSIVE_LOCKS_REQUIRED(!m_banned_mutex)
uint64_t GetOutboundTargetBytesLeft() const EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex)
response the bytes left in the current max outbound cycle in case of no limit, it will always respons...
NodeContext & EnsureAnyNodeContext(const std::any &context)
CSubNet LookupSubNet(const std::string &subnet_str)
Parse and resolve a specified subnet string into the appropriate internal representation.
We use block-relay-only connections to help prevent against partition attacks.
CConnman & EnsureConnman(const NodeContext &node)
const std::string UNIX_EPOCH_TIME
String used to describe UNIX epoch time in documentation, factored out to a constant for consistency...
ReachableNets g_reachable_nets
static std::vector< std::string > ToStrings(NetPermissionFlags flags)
static RPCHelpMan addconnection()
BanMan & EnsureBanman(const NodeContext &node)
bool AddConnection(const std::string &address, ConnectionType conn_type, bool use_v2transport) EXCLUSIVE_LOCKS_REQUIRED(!m_unused_i2p_sessions_mutex)
Attempts to open a connection.
static RPCHelpMan getrawaddrman()
Addresses from these networks are not publicly routable on the global Internet.