package tezos-protocol-010-PtGRANAD
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/tezos-protocol-010-PtGRANAD.raw/Tezos_raw_protocol_010_PtGRANAD/Voting_period_repr/index.html
Module Tezos_raw_protocol_010_PtGRANAD.Voting_period_reprSource
The voting period kinds are ordered as follows: Proposal -> Testing_vote -> Testing -> Promotion -> Adoption. This order is the one used be the function succ below.
type voting_period = {index : Tezos_protocol_environment_010_PtGRANAD.Int32.t;kind : kind;start_position : Tezos_protocol_environment_010_PtGRANAD.Int32.t;
}A voting period can be of several kinds and is uniquely identified by the counter 'index'. The 'start_position' represents the relative position of the first level of the period with respect to the first level of the Alpha family of protocols.
type info = {voting_period : t;position : Tezos_protocol_environment_010_PtGRANAD.Int32.t;remaining : Tezos_protocol_environment_010_PtGRANAD.Int32.t;
}Information about a block with respect to the voting period it belongs to: the voting period, the position within the voting period and the number of remaining blocks till the end of the period. The following invariant is satisfied: `position + remaining + 1 = blocks_per_voting_period`
include Tezos_protocol_environment_010_PtGRANAD.Compare.S
with type t := voting_period
val (=) : voting_period -> voting_period -> boolval (<>) : voting_period -> voting_period -> boolval (<) : voting_period -> voting_period -> boolval (<=) : voting_period -> voting_period -> boolval (>=) : voting_period -> voting_period -> boolval (>) : voting_period -> voting_period -> boolval compare : voting_period -> voting_period -> intval equal : voting_period -> voting_period -> boolval max : voting_period -> voting_period -> voting_periodval min : voting_period -> voting_period -> voting_periodreset period ~start_position increment the index by one and set the kind to Proposal which is the period kind that start the voting process. start_position is the level at wich this voting_period started.
succ period ~start_position increment the index by one and set the kind to its successor. start_position is the level at which this voting_period started.
val remaining_blocks :
Level_repr.t ->
t ->
blocks_per_voting_period:Tezos_protocol_environment_010_PtGRANAD.Int32.t ->
Tezos_protocol_environment_010_PtGRANAD.Int32.t