2016-09-08 21:13:10 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
2017-11-14 03:36:14 +04:00
|
|
|
(* Copyright (c) 2014 - 2017. *)
|
2016-09-08 21:13:10 +04:00
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
|
|
|
type t = private {
|
|
|
|
level: Raw_level_repr.t ;
|
2017-04-10 15:01:22 +04:00
|
|
|
level_position: int32 ;
|
2016-09-08 21:13:10 +04:00
|
|
|
cycle: Cycle_repr.t ;
|
|
|
|
cycle_position: int32 ;
|
|
|
|
voting_period: Voting_period_repr.t ;
|
|
|
|
voting_period_position: int32 ;
|
|
|
|
}
|
|
|
|
|
|
|
|
type level = t
|
|
|
|
val encoding: level Data_encoding.t
|
|
|
|
val pp: Format.formatter -> level -> unit
|
2017-02-16 00:18:48 +04:00
|
|
|
val pp_full: Format.formatter -> level -> unit
|
2016-09-08 21:13:10 +04:00
|
|
|
include Compare.S with type t := level
|
|
|
|
|
2017-04-10 15:01:22 +04:00
|
|
|
val root: Raw_level_repr.t -> level
|
2016-09-08 21:13:10 +04:00
|
|
|
|
|
|
|
val from_raw:
|
2017-04-10 15:01:22 +04:00
|
|
|
first_level:Raw_level_repr.t ->
|
|
|
|
cycle_length:int32 ->
|
|
|
|
voting_period_length:int32 ->
|
2016-09-08 21:13:10 +04:00
|
|
|
Raw_level_repr.t -> level
|
|
|
|
|
|
|
|
val diff: level -> level -> int32
|