net: Replace enum CConnMan::NumConnections with enum class ConnectionDirection

This commit is contained in:
Luke Dashjr
2019-10-16 17:37:19 +00:00
parent b4d22654fe
commit c77de622dd
9 changed files with 36 additions and 24 deletions

View File

@@ -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);