From f999524887448878ad973a3a72e8e26075285fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Tue, 20 Feb 2018 18:27:08 +0100 Subject: [PATCH] Proto/env: add missing type equalities --- .../tezos_protocol_environment.ml | 2 ++ .../tezos_protocol_environment.mli | 2 ++ src/proto_alpha/lib_protocol/src/main.mli | 20 +++++++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/src/lib_protocol_environment/tezos_protocol_environment.ml b/src/lib_protocol_environment/tezos_protocol_environment.ml index 8e0f1d6ab..0c3c63e79 100644 --- a/src/lib_protocol_environment/tezos_protocol_environment.ml +++ b/src/lib_protocol_environment/tezos_protocol_environment.ml @@ -139,6 +139,8 @@ module Make (Context : CONTEXT) = struct val wrap_error : 'a Error_monad.tzresult -> 'a tzresult module Lift (P : Updater.PROTOCOL) : PROTOCOL + with type operation = P.operation + and type validation_state = P.validation_state class ['block] proto_rpc_context : Tezos_rpc.RPC_context.t -> (unit, unit * 'block) RPC_path.t -> diff --git a/src/lib_protocol_environment/tezos_protocol_environment.mli b/src/lib_protocol_environment/tezos_protocol_environment.mli index ad0222ebe..39a7e5ef4 100644 --- a/src/lib_protocol_environment/tezos_protocol_environment.mli +++ b/src/lib_protocol_environment/tezos_protocol_environment.mli @@ -132,6 +132,8 @@ module Make (Context : CONTEXT) : sig val wrap_error : 'a Error_monad.tzresult -> 'a tzresult module Lift (P : Updater.PROTOCOL) : PROTOCOL + with type operation = P.operation + and type validation_state = P.validation_state class ['block] proto_rpc_context : Tezos_rpc.RPC_context.t -> (unit, unit * 'block) RPC_path.t -> diff --git a/src/proto_alpha/lib_protocol/src/main.mli b/src/proto_alpha/lib_protocol/src/main.mli index 5be87ad0c..aa5d1a074 100644 --- a/src/proto_alpha/lib_protocol/src/main.mli +++ b/src/proto_alpha/lib_protocol/src/main.mli @@ -9,4 +9,24 @@ (** Tezos Protocol Implementation - Protocol Signature Instance *) +type validation_mode = + | Application of { + block_header : Alpha_context.Block_header.t ; + baker : Alpha_context.public_key_hash ; + } + | Partial_construction of { + predecessor : Block_hash.t ; + } + | Full_construction of { + predecessor : Block_hash.t ; + protocol_data : Alpha_context.Block_header.protocol_data ; + baker : Alpha_context.public_key_hash ; + } + +type validation_state = + { mode : validation_mode ; + ctxt : Alpha_context.t ; + op_count : int } + include Updater.PROTOCOL with type operation = Alpha_context.Operation.t + and type validation_state := validation_state