aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
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.h
parentb4d22654fe9e90093e643cb7beb896c48a274d47 (diff)
net: Replace enum CConnMan::NumConnections with enum class ConnectionDirection
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/net.h b/src/net.h
index f1d22ffed0..beef47f045 100644
--- a/src/net.h
+++ b/src/net.h
@@ -17,6 +17,7 @@
#include <i2p.h>
#include <net_permissions.h>
#include <netaddress.h>
+#include <netbase.h>
#include <optional.h>
#include <policy/feerate.h>
#include <protocol.h>
@@ -801,13 +802,6 @@ class CConnman
{
public:
- enum NumConnections {
- CONNECTIONS_NONE = 0,
- CONNECTIONS_IN = (1U << 0),
- CONNECTIONS_OUT = (1U << 1),
- CONNECTIONS_ALL = (CONNECTIONS_IN | CONNECTIONS_OUT),
- };
-
struct Options
{
ServiceFlags nLocalServices = NODE_NONE;
@@ -976,7 +970,7 @@ public:
*/
bool AddConnection(const std::string& address, ConnectionType conn_type);
- size_t GetNodeCount(NumConnections num);
+ size_t GetNodeCount(ConnectionDirection);
void GetNodeStats(std::vector<CNodeStats>& vstats);
bool DisconnectNode(const std::string& node);
bool DisconnectNode(const CSubNet& subnet);