package octez-libs
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=aa2f5bc99cc4ca2217c52a1af2a2cdfd3b383208cb859ca2e79ca0903396ca1d
    
    
  sha512=d68bb3eb615e3dcccc845fddfc9901c95b3c6dc8e105e39522ce97637b1308a7fa7aa1d271351d5933febd7476b2819e1694f31198f1f0919681f1f9cc97cb3a
    
    
  doc/octez-libs.base/Tezos_base/Network_version/index.html
Module Tezos_base.Network_versionSource
type t = {- chain_name : Distributed_db_version.Name.t;
- distributed_db_version : Distributed_db_version.t;
- p2p_version : P2p_version.t;
}val announced : 
  chain_name:Distributed_db_version.Name.t ->
  distributed_db_versions:Distributed_db_version.t list ->
  p2p_versions:P2p_version.t list ->
  tGet the network protocol version to announce on peer connection.
Use the highest distributed_db_versions and the highest p2p_versions. The version also contains the chain_name since it is used to prevent peers from different networks to communicate.
Neither distributed_db_versions nor p2p_versions can be empty.
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.tzresultTry to find a version which is supported both by us and a peer.
Usage: select ~chain_name ~distributed_db_versions ~p2p_versions remote_version
If the chain name of remote_version is not equal to chain_name, there is no compatible version.
distributed_db_versions is the list of distributed database versions supported by the node. If the highest supported version is lesser or equal to the remote version, use this highest supported version. Otherwise, there is no compatible version.
Similarly, p2p_versions is the list of peer-to-peer versions supported by the node. The rules to find a compatible version are the same as the ones for distributed_db_versions.
If there is no compatible version, return a P2p_rejection.Rejecting error.