P2p: do not send bootstrap message to peers in private mode
This commit is contained in:
parent
6663109639
commit
6bbdf13bc5
@ -409,6 +409,7 @@ let write_all pool msg =
|
|||||||
pool.connected_peer_ids
|
pool.connected_peer_ids
|
||||||
|
|
||||||
let broadcast_bootstrap_msg pool =
|
let broadcast_bootstrap_msg pool =
|
||||||
|
if not pool.config.private_mode then
|
||||||
P2p_peer.Table.iter
|
P2p_peer.Table.iter
|
||||||
(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
|
||||||
|
@ -292,8 +292,9 @@ val write_all: ('msg, 'peer_meta,'conn_meta) pool -> 'msg -> unit
|
|||||||
connections to [pool] in [Running] state. *)
|
connections to [pool] in [Running] state. *)
|
||||||
|
|
||||||
val broadcast_bootstrap_msg: ('msg, 'peer_meta,'conn_meta) pool -> unit
|
val broadcast_bootstrap_msg: ('msg, 'peer_meta,'conn_meta) pool -> unit
|
||||||
(** [write_all pool msg] is [P2P_connection.write_now conn Bootstrap]
|
(** [broadcast_bootstrap_msg pool] is [P2P_connection.write_now conn Bootstrap]
|
||||||
for all member connections to [pool] in [Running] state. *)
|
for all member connections to [pool] in [Running] state.
|
||||||
|
This behavior is deactivated if the node is in private mode *)
|
||||||
|
|
||||||
val greylist_addr : ('msg, 'peer_meta,'conn_meta) pool -> P2p_addr.t -> unit
|
val greylist_addr : ('msg, 'peer_meta,'conn_meta) pool -> P2p_addr.t -> unit
|
||||||
(** [greylist_addr pool addr] adds [addr] to [pool]'s IP greylist. *)
|
(** [greylist_addr pool addr] adds [addr] to [pool]'s IP greylist. *)
|
||||||
|
Loading…
Reference in New Issue
Block a user