package tezos-base

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

P2p-layer protocol version.

type t = private int

An abstract version number for the low-level P2P layer.

val equal : t -> t -> bool
val compare : t -> t -> int
val pp : Format.formatter -> t -> unit
val encoding : t Data_encoding.t
val supported : t list
val zero : t
val one : t

Features

type feature =
  1. | Nack_with_list

Any new network-protocol feature should be declared here, and the feature_available function should be updated accordingly. This avoid to clutter the code base with hardcoded version comparisons.

val feature_available : feature -> t -> bool

feature_available feature version returns true if the feature is known to be available for the given p2p protocol version.