package tezos-protocol-017-PtNairob

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

The shell's notion of a level: an integer indicating the number of blocks since genesis: genesis is 0, all other blocks have increasing levels from there.

type raw_level = t
  • raises Invalid_argument

    when the level to encode is not positive

include Tezos_protocol_environment_017_PtNairob.Compare.S with type t := raw_level
val (=) : raw_level -> raw_level -> bool
val (<>) : raw_level -> raw_level -> bool
val (<) : raw_level -> raw_level -> bool
val (<=) : raw_level -> raw_level -> bool
val (>=) : raw_level -> raw_level -> bool
val (>) : raw_level -> raw_level -> bool
val compare : raw_level -> raw_level -> int
val equal : raw_level -> raw_level -> bool
val max : raw_level -> raw_level -> raw_level
val min : raw_level -> raw_level -> raw_level
val to_int32 : raw_level -> int32
val of_int32_exn : int32 -> raw_level
  • raises Invalid_argument

    when the level to encode is negative

Can trigger Unexpected_level error when the level to encode is negative

val diff : raw_level -> raw_level -> int32
val root : raw_level
val succ : raw_level -> raw_level
val pred : raw_level -> raw_level option
val pred_dontreturnzero : raw_level -> raw_level option

Return the predecessor of l when l >= 2, otherwise return None.

val add : raw_level -> int -> raw_level

add l i i must be positive

val sub : raw_level -> int -> raw_level option

sub l i i must be positive

OCaml

Innovation. Community. Security.