aboutsummaryrefslogtreecommitdiff
path: root/src/p2p
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-06-26 09:14:23 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-08-19 23:39:51 +0000
commitfd60d05d5d0c50790f518e7c58f11d73193fc249 (patch)
tree9566cc8f7e87d8d5008ccbc02014b113307611cd /src/p2p
parentMerge pull request #5685 (diff)
downloadmonero-fd60d05d5d0c50790f518e7c58f11d73193fc249.tar.xz
daemon: fix print_pl only printing public zone peers
Diffstat (limited to 'src/p2p')
-rw-r--r--src/p2p/net_node.h1
-rw-r--r--src/p2p/net_node.inl9
2 files changed, 10 insertions, 0 deletions
diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h
index cf6b2c67b..6d2ae878f 100644
--- a/src/p2p/net_node.h
+++ b/src/p2p/net_node.h
@@ -254,6 +254,7 @@ namespace nodetool
size_t get_public_white_peers_count();
size_t get_public_gray_peers_count();
void get_public_peerlist(std::vector<peerlist_entry>& gray, std::vector<peerlist_entry>& white);
+ void get_peerlist(std::vector<peerlist_entry>& gray, std::vector<peerlist_entry>& white);
size_t get_zone_count() const { return m_network_zones.size(); }
void change_max_out_public_peers(size_t count);
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 00467132a..8c0cff7e2 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -1739,6 +1739,15 @@ namespace nodetool
}
//-----------------------------------------------------------------------------------
template<class t_payload_net_handler>
+ void node_server<t_payload_net_handler>::get_peerlist(std::vector<peerlist_entry>& gray, std::vector<peerlist_entry>& white)
+ {
+ for (auto &zone: m_network_zones)
+ {
+ zone.second.m_peerlist.get_peerlist(gray, white); // appends
+ }
+ }
+ //-----------------------------------------------------------------------------------
+ template<class t_payload_net_handler>
bool node_server<t_payload_net_handler>::idle_worker()
{
m_peer_handshake_idle_maker_interval.do_call(boost::bind(&node_server<t_payload_net_handler>::peer_sync_idle_maker, this));