package tezos-protocol-012-Psithaca

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = private {
  1. level : Raw_level.t;
  2. level_position : int32;
  3. cycle : Cycle.t;
  4. cycle_position : int32;
  5. expected_commitment : bool;
}
include BASIC_DATA with type t := t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
val (>=) : t -> t -> bool
val (>) : t -> t -> bool
val compare : t -> t -> int
val equal : t -> t -> bool
val max : t -> t -> t
val min : t -> t -> t
val encoding : t Data_encoding.t
val pp : Stdlib.Format.formatter -> t -> unit
val pp_full : Stdlib.Format.formatter -> t -> unit
type level = t
val root : context -> level
val succ : context -> level -> level
val pred : context -> level -> level option
val from_raw : context -> Raw_level.t -> level
val from_raw_with_offset : context -> offset:int32 -> Raw_level.t -> (level, Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.trace) Stdlib.result

Fails with Negative_level_and_offset_sum if the sum of the raw_level and the offset is negative.

val add : context -> level -> int -> level

add c level i i must be positive

val sub : context -> level -> int -> level option

sub c level i i must be positive

val diff : level -> level -> int32
val current : context -> level
val last_level_in_cycle : context -> Cycle.t -> level
val levels_in_cycle : context -> Cycle.t -> level list
val levels_in_current_cycle : context -> ?offset:int32 -> unit -> level list
val last_allowed_fork_level : context -> Raw_level.t
val dawn_of_a_new_cycle : context -> Cycle.t option
val may_snapshot_rolls : context -> bool
OCaml

Innovation. Community. Security.