From 92523bc4a5bc1f0bcdaa2746a682758fd6781cd7 Mon Sep 17 00:00:00 2001 From: Lesenechal Remi Date: Thu, 19 Dec 2019 16:09:53 +0100 Subject: [PATCH] exposing context type to be able to modify the timestamps in the tests --- .../tezos-protocol-alpha/alpha_context.mli | 2 +- .../tezos-protocol-alpha/raw_context.mli | 29 ++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/vendors/ligo-utils/tezos-protocol-alpha/alpha_context.mli b/vendors/ligo-utils/tezos-protocol-alpha/alpha_context.mli index b970ad110..73dcb59ea 100644 --- a/vendors/ligo-utils/tezos-protocol-alpha/alpha_context.mli +++ b/vendors/ligo-utils/tezos-protocol-alpha/alpha_context.mli @@ -30,7 +30,7 @@ module type BASIC_DATA = sig val pp: Format.formatter -> t -> unit end -type t +type t = Raw_context.t type context = t type public_key = Signature.Public_key.t diff --git a/vendors/ligo-utils/tezos-protocol-alpha/raw_context.mli b/vendors/ligo-utils/tezos-protocol-alpha/raw_context.mli index 86cc62187..749878b6c 100644 --- a/vendors/ligo-utils/tezos-protocol-alpha/raw_context.mli +++ b/vendors/ligo-utils/tezos-protocol-alpha/raw_context.mli @@ -45,7 +45,34 @@ val storage_error: storage_error -> 'a tzresult Lwt.t (** Abstract view of the context. Includes a handle to the functional key-value database ({!Context.t}) along with some in-memory values (gas, etc.). *) -type t +module Int_set : sig + type t +end +type t = { + context: Context.t ; + constants: Constants_repr.parametric ; + first_level: Raw_level_repr.t ; + level: Level_repr.t ; + predecessor_timestamp: Time.t ; + timestamp: Time.t ; + fitness: Int64.t ; + deposits: Tez_repr.t Signature.Public_key_hash.Map.t ; + included_endorsements: int ; + allowed_endorsements: + (Signature.Public_key.t * int list * bool) Signature.Public_key_hash.Map.t ; + fees: Tez_repr.t ; + rewards: Tez_repr.t ; + block_gas: Z.t ; + operation_gas: Gas_limit_repr.t ; + internal_gas: Gas_limit_repr.internal_gas ; + storage_space_to_pay: Z.t option ; + allocated_contracts: int option ; + origination_nonce: Contract_repr.origination_nonce option ; + temporary_big_map: Z.t ; + internal_nonce: int ; + internal_nonces_used: Int_set.t ; +} + type context = t type root_context = t