package tezos-protocol-alpha

  1. Overview
  2. Docs
Tezos/Protocol: economic-protocol definition

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-16.1.tar.gz
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f

doc/tezos-protocol-alpha.raw/Tezos_raw_protocol_alpha/Dal_slot_index_repr/index.html

Module Tezos_raw_protocol_alpha.Dal_slot_index_reprSource

Sourcetype t

Slot index

A slot index is a possible value for a slot index with an upper bound. If a choice is ever made to increase the size of available slots in the protocol, we also need to change this module to accommodate for higher values.

Sourceval max_value : t
Sourceval zero : t
Sourcetype Tezos_protocol_environment_alpha.Error_monad.error +=
  1. | Invalid_slot_index of {
    1. given : t;
    2. min : t;
    3. max : t;
    }

of_int n constructs a value of type t from n. Returns Invalid_slot_index in case the given value is not in the interval zero, max_value.

Sourceval of_int_opt : int -> t option

of_int_opt n constructs a value of type t from n. Returns None in case the given value is not in the interval zero, max_value.

Sourceval to_int : t -> int
Sourceval to_int_list : t list -> int list
Sourceval compare : t -> t -> int
Sourceval equal : t -> t -> bool
Sourceval slots_range : lower:int -> upper:int -> t list Tezos_protocol_environment_alpha.Error_monad.tzresult

slots_range ~lower ~upper returns the list of slots indexes between lower and upper.

If lower is negative or upper is bigger than max_value, the function returns Invalid_slot_index.

Sourceval slots_range_opt : lower:int -> upper:int -> t list option

slots_range_opt ~lower ~upper is similar to slots_range, but return None instead of an error.

OCaml

Innovation. Community. Security.