tezos-base

Tezos: meta-package and pervasive type definitions for Tezos
Library tezos-base
type t = {
chain_name : Distributed_db_version.Name.t;
distributed_db_version : Distributed_db_version.t;
p2p_version : P2p_version.t;
}
val pp : Format.formatter -> t -> unit
val encoding : t Data_encoding.t
val announced : chain_name:Distributed_db_version.Name.t -> distributed_db_versions:Distributed_db_version.t list -> p2p_versions:P2p_version.t list -> t

announced supported computes the network protocol version announced on peer connection, given the supported versions for the higher-level messages.

val select : chain_name:Distributed_db_version.Name.t -> distributed_db_versions:Distributed_db_version.t list -> p2p_versions:P2p_version.t list -> t -> t Tezos_error_monad.Error_monad.tzresult

select acceptables remote computes network protocol version to be used on a given connection where remote is version announced by the remote peer, and acceptables the locally accepted versions for the higher-level messages.