File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -2019,6 +2019,19 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
20192019 }
20202020}
20212021
2022+ std::vector<CAddress> CConnman::GetCurrentBlockRelayOnlyConns () const
2023+ {
2024+ std::vector<CAddress> ret;
2025+ LOCK (cs_vNodes);
2026+ for (const CNode* pnode : vNodes) {
2027+ if (pnode->IsBlockOnlyConn ()) {
2028+ ret.push_back (pnode->addr );
2029+ }
2030+ }
2031+
2032+ return ret;
2033+ }
2034+
20222035std::vector<AddedNodeInfo> CConnman::GetAddedNodeInfo ()
20232036{
20242037 std::vector<AddedNodeInfo> ret;
Original file line number Diff line number Diff line change @@ -460,6 +460,11 @@ class CConnman
460460 void RecordBytesRecv (uint64_t bytes);
461461 void RecordBytesSent (uint64_t bytes);
462462
463+ /* *
464+ * Return vector of current BLOCK_RELAY peers.
465+ */
466+ std::vector<CAddress> GetCurrentBlockRelayOnlyConns () const ;
467+
463468 // Whether the node should be passed out in ForEach* callbacks
464469 static bool NodeFullyConnected (const CNode* pnode);
465470
You can’t perform that action at this time.
0 commit comments