package octez-shell-libs

  1. Overview
  2. Docs
Octez shell libraries

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65

doc/octez-shell-libs.p2p/Tezos_p2p/P2p_pool/Points/index.html

Module P2p_pool.PointsSource

Sourcetype ('msg, 'peer, 'conn) info = ('msg, 'peer, 'conn) P2p_conn.t P2p_point_state.Info.t
Sourceval info : ('msg, 'peer, 'conn) t -> Tezos_base.TzPervasives.P2p_point.Id.t -> ('msg, 'peer, 'conn) info option
Sourceval 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.

Sourceval 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.

Sourceval 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.

Sourceval 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
Sourceval remove_connected : ('msg, 'peer, 'conn) t -> 'd P2p_point_state.Info.t -> unit
Sourceval 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.

Sourceval unban : ('msg, 'peer, 'conn) t -> Tezos_base.TzPervasives.P2p_point.Id.t -> unit

unban t point_id removes this point address from the black list. and unban all associated peers. The point_id port is ignored.

Sourceval banned : ('msg, 'peer, 'conn) t -> Tezos_base.TzPervasives.P2p_point.Id.t -> bool

banned t point_id returns true if the point addr is in the black list. This point_id's port is ignored.

Sourceval get_trusted : ('msg, 'peer, 'conn) t -> Tezos_base.TzPervasives.P2p_point.Id.t -> bool

get_trusted t point_id returns false if this point isn't known. Otherwise it calls trusted for this peer info.

Sourceval trust : ('msg, 'peer, 'conn) t -> Tezos_base.TzPervasives.P2p_point.Id.t -> unit

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).

Sourceval untrust : ('msg, 'peer, 'conn) t -> Tezos_base.TzPervasives.P2p_point.Id.t -> unit

untrust t point_id sets the point info peer info for this point to not trusted. Does nothing if point isn't known.

Sourceval get_greylisted_list : ('msg, 'peer, 'conn) t -> Tezos_base.TzPervasives.P2p_addr.t list

get_greylisted_list t if greylisted_list_not_reliable_since t returns None, returns the list of currently greylisted IPs.

Sourceval greylisted_list_not_reliable_since : ('msg, 'peer, 'conn) t -> Tezos_base.TzPervasives.Time.System.t option
OCaml

Innovation. Community. Security.