aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2019-10-16 17:37:19 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2021-03-04 19:54:17 +0000
commitc77de622dd8ef458f73b1a01a34629a7c4f49358 (patch)
treeda0910c8472e5ab4820c16be3609b8b8bccd1a35 /src/net.cpp
parentb4d22654fe9e90093e643cb7beb896c48a274d47 (diff)
downloadbitcoin-c77de622dd8ef458f73b1a01a34629a7c4f49358.tar.xz
net: Replace enum CConnMan::NumConnections with enum class ConnectionDirection
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp6
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++;
}
}