Tezos_version.Octez_node_version
Node version information.
This module provides several information regarding the node's version:
type t = {
version : Version.t;
network_version : Network_version.t;
commit_info : commit_info option;
}
val version_encoding : Version.t Data_encoding.t
val commit_info_encoding : commit_info Data_encoding.t
val commit_info_pp : Stdlib.Format.formatter -> commit_info -> unit
val commit_info_pp_short : Stdlib.Format.formatter -> commit_info -> unit
val commit_info_equivalent : commit_info -> commit_info -> bool
val encoding : t Data_encoding.t
val partially_compare :
Version.t ->
commit_info option ->
Version.t ->
commit_info option ->
int option
partially_compare v1 c1 v2 c2
is similar to compare like function but returns None
when versions are not comparable. If v1
, c1
and v2
, c2
are comparable and 1 is older than 2, Some x
with x<0 is returned.
v1
, c1
and v2
, c2
are comparable if:
Beta
, RC
or Release
orDev
, Beta_dev
or RC_dev
andv1
and v2
are equal, but c1
and c2
are not then they are not comparable.c1
and c2
are used only for equality. If the hash of c1
or c2
is a prefix or equal to the other one, they are considered as equal.
To determine which version is more recent or old:
major
has the priority on minor
minor
has priority on additional_info
Beta
is older than RC
RC
is older than Release