Refactor: Move Blake2B.Make instanciation into Tezos_base

This commit is contained in:
Grégoire Henry 2018-01-23 15:11:55 +01:00
parent b0466aceed
commit c4420ac40e
18 changed files with 35 additions and 10 deletions

View File

@ -7,4 +7,4 @@
(* *) (* *)
(**************************************************************************) (**************************************************************************)
include S.INTERNAL_HASH include Tezos_crypto.S.INTERNAL_HASH

View File

@ -7,4 +7,4 @@
(* *) (* *)
(**************************************************************************) (**************************************************************************)
include S.INTERNAL_HASH include Tezos_crypto.S.INTERNAL_HASH

View File

@ -7,6 +7,8 @@
(* *) (* *)
(**************************************************************************) (**************************************************************************)
open Error_monad
type t = string type t = string
let name = "Net_id" let name = "Net_id"

View File

@ -7,5 +7,5 @@
(* *) (* *)
(**************************************************************************) (**************************************************************************)
include S.INTERNAL_HASH include Tezos_crypto.S.INTERNAL_HASH
val of_block_hash: Block_hash.t -> t val of_block_hash: Block_hash.t -> t

View File

@ -7,4 +7,4 @@
(* *) (* *)
(**************************************************************************) (**************************************************************************)
include S.INTERNAL_HASH include Tezos_crypto.S.INTERNAL_HASH

View File

@ -7,5 +7,5 @@
(* *) (* *)
(**************************************************************************) (**************************************************************************)
include S.INTERNAL_MERKLE_TREE with type elt = Operation_hash.t include Tezos_crypto.S.INTERNAL_MERKLE_TREE with type elt = Operation_hash.t

View File

@ -7,4 +7,4 @@
(* *) (* *)
(**************************************************************************) (**************************************************************************)
include S.INTERNAL_MERKLE_TREE with type elt = Operation_list_hash.t include Tezos_crypto.S.INTERNAL_MERKLE_TREE with type elt = Operation_list_hash.t

View File

@ -7,4 +7,4 @@
(* *) (* *)
(**************************************************************************) (**************************************************************************)
include S.INTERNAL_HASH include Tezos_crypto.S.INTERNAL_HASH

View File

@ -9,10 +9,10 @@
include Tezos_stdlib include Tezos_stdlib
include Tezos_stdlib_lwt include Tezos_stdlib_lwt
include Tezos_crypto
include Tezos_data_encoding include Tezos_data_encoding
include Tezos_error_monad include Tezos_error_monad
include Tezos_rpc include Tezos_rpc
include Tezos_crypto
module List = struct module List = struct
include List include List
@ -30,6 +30,14 @@ module Block_header = Block_header
module Operation = Operation module Operation = Operation
module Protocol = Protocol module Protocol = Protocol
module Net_id = Net_id
module Block_hash = Block_hash
module Operation_hash = Operation_hash
module Operation_list_hash = Operation_list_hash
module Operation_list_list_hash = Operation_list_list_hash
module Context_hash = Context_hash
module Protocol_hash = Protocol_hash
module Test_network_status = Test_network_status module Test_network_status = Test_network_status
module Preapply_result = Preapply_result module Preapply_result = Preapply_result

View File

@ -10,9 +10,9 @@
include (module type of (struct include Tezos_stdlib end)) include (module type of (struct include Tezos_stdlib end))
include (module type of (struct include Tezos_data_encoding end)) include (module type of (struct include Tezos_data_encoding end))
include (module type of (struct include Tezos_stdlib_lwt end)) include (module type of (struct include Tezos_stdlib_lwt end))
include (module type of (struct include Tezos_crypto end))
include (module type of (struct include Tezos_error_monad end)) include (module type of (struct include Tezos_error_monad end))
include (module type of (struct include Tezos_rpc end)) include (module type of (struct include Tezos_rpc end))
include (module type of (struct include Tezos_crypto end))
module List : sig module List : sig
include (module type of (struct include List end)) include (module type of (struct include List end))
@ -34,5 +34,13 @@ module Preapply_result = Preapply_result
module Block_locator = Block_locator module Block_locator = Block_locator
module Mempool = Mempool module Mempool = Mempool
module Net_id = Net_id
module Block_hash = Block_hash
module Operation_hash = Operation_hash
module Operation_list_hash = Operation_list_hash
module Operation_list_list_hash = Operation_list_list_hash
module Context_hash = Context_hash
module Protocol_hash = Protocol_hash
include (module type of (struct include Utils.Infix end)) include (module type of (struct include Utils.Infix end))
include (module type of (struct include Error_monad end)) include (module type of (struct include Error_monad end))

View File

@ -16,7 +16,7 @@ let () =
Format.printf {| Format.printf {|
module Source = struct module Source = struct
let hash = let hash =
Some (Tezos_crypto.Protocol_hash.of_b58check_exn %S) Some (Tezos_base.Protocol_hash.of_b58check_exn %S)
let sources = Tezos_base.Protocol.%a let sources = Tezos_base.Protocol.%a
end end
@.|} @.|}

View File

@ -43,6 +43,13 @@ module Make(Param : sig val name: string end)() = struct
module Hash = struct module Hash = struct
include Tezos_crypto include Tezos_crypto
include Tezos_crypto.S include Tezos_crypto.S
module Net_id = Net_id
module Block_hash = Block_hash
module Operation_hash = Operation_hash
module Operation_list_hash = Operation_list_hash
module Operation_list_list_hash = Operation_list_list_hash
module Context_hash = Context_hash
module Protocol_hash = Protocol_hash
module Make_minimal_Blake2B = Blake2B.Make_minimal module Make_minimal_Blake2B = Blake2B.Make_minimal
module Make_Blake2B = Blake2B.Make module Make_Blake2B = Blake2B.Make
end end