package tezos-protocol-alpha

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

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-17.3.tar.gz
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc

doc/tezos-protocol-alpha.raw/Tezos_raw_protocol_alpha/Bounded_history_repr/Make/index.html

Module Bounded_history_repr.MakeSource

Parameters

module Name : NAME
module Key : KEY
module Value : VALUE

Signature

Sourcetype t
Sourcetype key = Key.t
Sourcetype value = Value.t
Sourceval empty : capacity:int64 -> t

empty ~capacity returns a new table whose maximum capacity is given.

Encoding for values of type t

Pretty-printer for values of type t

Sourceval find : key -> t -> value option

find key t returns Some value if there exists some value associated to key in the table, and None otherwise.

Sourcetype Tezos_protocol_environment_alpha.Error_monad.error +=
  1. | Key_bound_to_different_value of {
    1. key : key;
    2. existing_value : value;
    3. given_value : value;
    }

remember key value t inserts a new entry (key |-> value) in t.

If key already exists in t, its associated binding value' should be equal to value. In this case, t is returned unchanged. Otherwise, an error Key_bound_to_different_value is returned.

If key is not already present in t, the new binding (key |-> value) is inserted in t. If the number of elements would exceed t's capacity after the insertion of the new binding, the oldest binding is removed from t.

The structure t is returned unchanged if its capacity is negative or null.

Sourcemodule Internal_for_tests : sig ... end
OCaml

Innovation. Community. Security.