package octez-shell-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-shell-libs.p2p/Tezos_p2p/P2p_pool/Points/index.html
Module P2p_pool.Points
Source
val info :
('msg, 'peer, 'conn) t ->
Tezos_base.TzPervasives.P2p_point.Id.t ->
('msg, 'peer, 'conn) info option
val fold_known :
('msg, 'peer, 'conn) t ->
init:'a ->
f:
(Tezos_base.TzPervasives.P2p_point.Id.t ->
('msg, 'peer, 'conn) P2p_conn.t P2p_point_state.Info.t ->
'a ->
'a) ->
'a
fold_known pool ~init ~f
computes (f iN pN ... (f i1 p1 init)...)
where id1 ... idN
are the ids of every known points and p1 ... pN
the associated points info.
val iter_known :
(Tezos_base.TzPervasives.P2p_point.Id.t ->
('msg, 'peer, 'conn) P2p_conn.t P2p_point_state.Info.t ->
unit) ->
('msg, 'peer, 'conn) t ->
unit
iter_known f pool
applies f
to all known points of pool
.
val fold_connected :
('msg, 'peer, 'conn) t ->
init:'a ->
f:
(Tezos_base.TzPervasives.P2p_point.Id.t ->
('msg, 'peer, 'conn) info ->
'a ->
'a) ->
'a
fold_known pool ~init ~f
computes (f iN pN ... (f i1 p1 init)...)
where id1 ... idN
are the ids of every connected points and p1 ... pN
the associated points info.
val add_connected :
('msg, 'peer, 'conn) t ->
Tezos_base.TzPervasives.P2p_point.Id.t ->
('msg, 'peer, 'conn) P2p_conn.t P2p_point_state.Info.t ->
unit
val ban :
('msg, 'peer, 'conn) t ->
?ban_peers:bool ->
Tezos_base.TzPervasives.P2p_point.Id.t ->
unit Lwt.t
ban t point_id
marks the address of this point_id as blacklisted. It disconnects and bans all connections to this address. If ban_peers
is false the associated peers are disconnected but not banned. The point_id
port is ignored.
unban t point_id
removes this point address from the black list. and unban all associated peers. The point_id
port is ignored.
banned t point_id
returns true
if the point addr is in the black list. This point_id
's port is ignored.
get_trusted t point_id
returns false
if this point isn't known. Otherwise it calls trusted
for this peer info.
trust t point_id
sets the point info for this point to trusted, and unban
it. The point is registered first if not known (see register_point
).
untrust t point_id
sets the point info peer info for this point to not trusted. Does nothing if point isn't known.
get_greylisted_list t
if greylisted_list_not_reliable_since t
returns None
, returns the list of currently greylisted IPs.
val greylisted_list_not_reliable_since :
('msg, 'peer, 'conn) t ->
Tezos_base.TzPervasives.Time.System.t option