P2p: do not request new peers from known private peers

This commit is contained in:
OCamlPro-Iguernlala 2018-05-31 18:50:24 +02:00 committed by Grégoire Henry
parent bcb56331b5
commit 6b287ba98e

View File

@ -415,6 +415,9 @@ let broadcast_bootstrap_msg pool =
(fun _peer_id peer_info -> (fun _peer_id peer_info ->
match P2p_peer_state.get peer_info with match P2p_peer_state.get peer_info with
| Running { data = { conn } } -> | Running { data = { conn } } ->
(* 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 ) ignore (P2p_socket.write_now conn Bootstrap : bool tzresult )
| _ -> ()) | _ -> ())
pool.connected_peer_ids pool.connected_peer_ids