aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/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/rpc/net.cpp
parentb4d22654fe9e90093e643cb7beb896c48a274d47 (diff)
downloadbitcoin-c77de622dd8ef458f73b1a01a34629a7c4f49358.tar.xz
net: Replace enum CConnMan::NumConnections with enum class ConnectionDirection
Diffstat (limited to 'src/rpc/net.cpp')
-rw-r--r--src/rpc/net.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 6d33654c6f..cf4d46cf2c 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -57,7 +57,7 @@ static RPCHelpMan getconnectioncount()
if(!node.connman)
throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
- return (int)node.connman->GetNodeCount(CConnman::CONNECTIONS_ALL);
+ return (int)node.connman->GetNodeCount(ConnectionDirection::Both);
},
};
}
@@ -630,9 +630,9 @@ static RPCHelpMan getnetworkinfo()
obj.pushKV("timeoffset", GetTimeOffset());
if (node.connman) {
obj.pushKV("networkactive", node.connman->GetNetworkActive());
- obj.pushKV("connections", (int)node.connman->GetNodeCount(CConnman::CONNECTIONS_ALL));
- obj.pushKV("connections_in", (int)node.connman->GetNodeCount(CConnman::CONNECTIONS_IN));
- obj.pushKV("connections_out", (int)node.connman->GetNodeCount(CConnman::CONNECTIONS_OUT));
+ obj.pushKV("connections", (int)node.connman->GetNodeCount(ConnectionDirection::Both));
+ obj.pushKV("connections_in", (int)node.connman->GetNodeCount(ConnectionDirection::In));
+ obj.pushKV("connections_out", (int)node.connman->GetNodeCount(ConnectionDirection::Out));
}
obj.pushKV("networks", GetNetworksInfo());
obj.pushKV("relayfee", ValueFromAmount(::minRelayTxFee.GetFeePerK()));