aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-09-12 18:03:06 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-10-09 14:29:04 +0300
commitbad16aff490dcf87722fbfe202a869fb24c734e1 (patch)
tree3da2d65f68fb2151282ac219dbfd7965a13fd0bf /src/net.cpp
parentc29272a157d09a8125788c1b860e89b63b4cb36c (diff)
p2p: Add CConnman::GetCurrentBlockRelayOnlyConns()
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 95ba6da819..53cf4ca017 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2019,6 +2019,19 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
}
}
+std::vector<CAddress> CConnman::GetCurrentBlockRelayOnlyConns() const
+{
+ std::vector<CAddress> ret;
+ LOCK(cs_vNodes);
+ for (const CNode* pnode : vNodes) {
+ if (pnode->IsBlockOnlyConn()) {
+ ret.push_back(pnode->addr);
+ }
+ }
+
+ return ret;
+}
+
std::vector<AddedNodeInfo> CConnman::GetAddedNodeInfo()
{
std::vector<AddedNodeInfo> ret;