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,7 +415,10 @@ 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 } } ->
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 pool.connected_peer_ids