package tezos-protocol-017-PtNairob
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-protocol-017-PtNairob.raw/Tezos_raw_protocol_017_PtNairob/Dal_slot_index_repr/index.html
Module Tezos_raw_protocol_017_PtNairob.Dal_slot_index_repr
Source
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.
val check_is_in_range :
t ->
unit Tezos_protocol_environment_017_PtNairob.Error_monad.tzresult
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]
.
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]
.
val slots_range :
lower:int ->
upper:int ->
t list Tezos_protocol_environment_017_PtNairob.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
.
slots_range_opt ~lower ~upper
is similar to slots_range
, but return None
instead of an error.