package tezos-protocol-012-Psithaca

  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_012_Psithaca.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 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.