Proto/env: export *_hash.zero

This commit is contained in:
Grégoire Henry 2018-02-11 19:17:39 +01:00
parent 2c90308caf
commit 82530eeb29
4 changed files with 9 additions and 9 deletions

View File

@ -80,8 +80,6 @@ module type INTERNAL_HASH = sig
include Tezos_crypto.S.HASH
val zero: t
val of_b58check: string -> t tzresult
val of_bytes: MBytes.t -> t tzresult

View File

@ -107,6 +107,11 @@ module Make_minimal (K : Name) = struct
and p6 = if len > 10 then String.sub p 10 (len - 10) else "" in
[ p1 ; p2 ; p3 ; p4 ; p5 ; p6 ]
let zero =
match of_hex (String.make (size * 2) '0') with
| Some c -> c
| None -> assert false
end
module Make (R : sig
@ -121,11 +126,6 @@ module Make (R : sig
include Make_minimal(K)
let zero =
match of_hex (String.make (size * 2) '0') with
| Some c -> c
| None -> assert false
(* Serializers *)
type Base58.data += Hash of t

View File

@ -51,14 +51,14 @@ module type MINIMAL_HASH = sig
val prefix_path: string -> string list
val path_length: int
val zero: t
end
module type HASH = sig
include MINIMAL_HASH
val zero: t
val to_b58check: t -> string
val to_short_b58check: t -> string

View File

@ -88,6 +88,8 @@ module type MINIMAL_HASH = sig
val prefix_path: string -> string list
val path_length: int
val zero: t
end
module type HASH = sig