ligo/src/lib_base/block_header.mli
2018-06-12 21:27:55 +02:00

33 lines
1.2 KiB
OCaml

(**************************************************************************)
(* *)
(* Copyright (c) 2014 - 2018. *)
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
(* *)
(* All rights reserved. No warranty, explicit or implicit, provided. *)
(* *)
(**************************************************************************)
type shell_header = {
level: Int32.t ;
proto_level: int ; (* uint8 *)
predecessor: Block_hash.t ;
timestamp: Time.t ;
validation_passes: int ; (* uint8 *)
operations_hash: Operation_list_list_hash.t ;
fitness: Fitness.t ;
context: Context_hash.t ;
}
val shell_header_encoding: shell_header Data_encoding.t
type t = {
shell: shell_header ;
protocol_data: MBytes.t ;
}
include S.HASHABLE with type t := t
and type hash := Block_hash.t
val of_bytes_exn: MBytes.t -> t
val bounded_encoding: ?max_size:int -> unit -> t Data_encoding.t