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)
2019
2019
}
2020
2020
}
2021
2021
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
+
2022
2035
std::vector<AddedNodeInfo> CConnman::GetAddedNodeInfo ()
2023
2036
{
2024
2037
std::vector<AddedNodeInfo> ret;
Original file line number Diff line number Diff line change @@ -460,6 +460,11 @@ class CConnman
460
460
void RecordBytesRecv (uint64_t bytes);
461
461
void RecordBytesSent (uint64_t bytes);
462
462
463
+ /* *
464
+ * Return vector of current BLOCK_RELAY peers.
465
+ */
466
+ std::vector<CAddress> GetCurrentBlockRelayOnlyConns () const ;
467
+
463
468
// Whether the node should be passed out in ForEach* callbacks
464
469
static bool NodeFullyConnected (const CNode* pnode);
465
470
You can’t perform that action at this time.
0 commit comments