From 6b287ba98e55e0edbddb1b449be499d135dffb1b Mon Sep 17 00:00:00 2001 From: OCamlPro-Iguernlala Date: Thu, 31 May 2018 18:50:24 +0200 Subject: [PATCH] P2p: do not request new peers from known private peers --- src/lib_p2p/p2p_pool.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib_p2p/p2p_pool.ml b/src/lib_p2p/p2p_pool.ml index ec43451a8..d8463fba9 100644 --- a/src/lib_p2p/p2p_pool.ml +++ b/src/lib_p2p/p2p_pool.ml @@ -415,7 +415,10 @@ let broadcast_bootstrap_msg pool = (fun _peer_id peer_info -> match P2p_peer_state.get peer_info with | Running { data = { conn } } -> - ignore (P2p_socket.write_now conn Bootstrap : bool tzresult ) + (* should not ask private nodes for the list of their + known peers*) + if not (P2p_socket.private_node conn) then + ignore (P2p_socket.write_now conn Bootstrap : bool tzresult ) | _ -> ()) pool.connected_peer_ids