diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-09-12 18:03:06 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-10-09 14:29:04 +0300 |
commit | bad16aff490dcf87722fbfe202a869fb24c734e1 (patch) | |
tree | 3da2d65f68fb2151282ac219dbfd7965a13fd0bf /src/net.cpp | |
parent | c29272a157d09a8125788c1b860e89b63b4cb36c (diff) |
p2p: Add CConnman::GetCurrentBlockRelayOnlyConns()
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 13 |
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; |