package tezos-protocol-012-Psithaca

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type round_and_offset_raw = {
  1. round : round;
  2. offset : Period_repr.t;
}
val round_and_offset : Durations.t -> level_offset:Period_repr.t -> (round_and_offset_raw, Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.trace) result

round_and_offset round_durations ~level_offset, where level_offset represents a time offset with respect to the start of the first round, returns a tuple (r, round_offset) where the round r is such that level_offset_of_round(r) <= level_offset < level_offset_of_round(r+1) and round_offset := level_offset - level_offset_of_round(r)].

round = 0 1 2 3 r

|-----|-----|-----|-----|-----|--- ... ... --|--------|-- ... --|------- | round_delay(r) | | <-----> round_offset <---------------------------------------------------> level_offset

OCaml

Innovation. Community. Security.