diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2019-10-16 17:37:19 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2021-03-04 19:54:17 +0000 |
commit | c77de622dd8ef458f73b1a01a34629a7c4f49358 (patch) | |
tree | da0910c8472e5ab4820c16be3609b8b8bccd1a35 /src/net.cpp | |
parent | b4d22654fe9e90093e643cb7beb896c48a274d47 (diff) | |
download | bitcoin-c77de622dd8ef458f73b1a01a34629a7c4f49358.tar.xz |
net: Replace enum CConnMan::NumConnections with enum class ConnectionDirection
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net.cpp b/src/net.cpp index 513328897b..cf7d3e50ba 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2725,15 +2725,15 @@ bool CConnman::RemoveAddedNode(const std::string& strNode) return false; } -size_t CConnman::GetNodeCount(NumConnections flags) +size_t CConnman::GetNodeCount(ConnectionDirection flags) { LOCK(cs_vNodes); - if (flags == CConnman::CONNECTIONS_ALL) // Shortcut if we want total + if (flags == ConnectionDirection::Both) // Shortcut if we want total return vNodes.size(); int nNum = 0; for (const auto& pnode : vNodes) { - if (flags & (pnode->IsInboundConn() ? CONNECTIONS_IN : CONNECTIONS_OUT)) { + if (flags & (pnode->IsInboundConn() ? ConnectionDirection::In : ConnectionDirection::Out)) { nNum++; } } |