From 89d9d83b15433a4d0581a73f1b8eb903b69512f9 Mon Sep 17 00:00:00 2001 From: Benjamin Canou Date: Mon, 21 May 2018 20:42:37 +0200 Subject: [PATCH] Alpha: remove unused error --- .../lib_baking/test/proto_alpha_helpers.ml | 2 +- src/proto_alpha/lib_protocol/src/contract_storage.ml | 12 ------------ .../lib_protocol/src/contract_storage.mli | 1 - 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/proto_alpha/lib_baking/test/proto_alpha_helpers.ml b/src/proto_alpha/lib_baking/test/proto_alpha_helpers.ml index 0029e0550..f1a8a4e2f 100644 --- a/src/proto_alpha/lib_baking/test/proto_alpha_helpers.ml +++ b/src/proto_alpha/lib_baking/test/proto_alpha_helpers.ml @@ -459,7 +459,7 @@ module Assert = struct let missing_public_key ~msg = contain_error ~msg ~f:begin ecoproto_error (function - | Contract_storage.Missing_public_key _ -> true + | Contract_storage.Unrevealed_manager_key _ -> true | _ -> false) end diff --git a/src/proto_alpha/lib_protocol/src/contract_storage.ml b/src/proto_alpha/lib_protocol/src/contract_storage.ml index e626db56e..f6d8aaec6 100644 --- a/src/proto_alpha/lib_protocol/src/contract_storage.ml +++ b/src/proto_alpha/lib_protocol/src/contract_storage.ml @@ -16,7 +16,6 @@ type error += | Empty_implicit_contract of Signature.Public_key_hash.t (* `Temporary *) | Inconsistent_hash of Signature.Public_key.t * Signature.Public_key_hash.t * Signature.Public_key_hash.t (* `Permanent *) | Inconsistent_public_key of Signature.Public_key.t * Signature.Public_key.t (* `Permanent *) - | Missing_public_key of Signature.Public_key_hash.t (* `Permanent *) | Failure of string (* `Permanent *) | Previously_revealed_key of Contract_repr.t (* `Permanent *) | Unrevealed_manager_key of Contract_repr.t (* `Permanent *) @@ -121,17 +120,6 @@ let () = (req "expected_public_key" Signature.Public_key.encoding)) (function Inconsistent_public_key (eh, ph) -> Some (eh, ph) | _ -> None) (fun (eh, ph) -> Inconsistent_public_key (eh, ph)) ; - register_error_kind - `Permanent - ~id:"contract.manager.missing_public_key" - ~title:"Missing public key" - ~description:"The manager public key must be provided to execute the current operation" - ~pp:(fun ppf k -> - Format.fprintf ppf "The manager public key ( with hash %a ) is missing" - Signature.Public_key_hash.pp k) - Data_encoding.(obj1 (req "hash" Signature.Public_key_hash.encoding)) - (function Missing_public_key k -> Some k | _ -> None) - (fun k -> Missing_public_key k) ; register_error_kind `Permanent ~id:"contract.failure" diff --git a/src/proto_alpha/lib_protocol/src/contract_storage.mli b/src/proto_alpha/lib_protocol/src/contract_storage.mli index 720504e9f..34d40fbc4 100644 --- a/src/proto_alpha/lib_protocol/src/contract_storage.mli +++ b/src/proto_alpha/lib_protocol/src/contract_storage.mli @@ -16,7 +16,6 @@ type error += | Empty_implicit_contract of Signature.Public_key_hash.t (* `Temporary *) | Inconsistent_hash of Signature.Public_key.t * Signature.Public_key_hash.t * Signature.Public_key_hash.t (* `Permanent *) | Inconsistent_public_key of Signature.Public_key.t * Signature.Public_key.t (* `Permanent *) - | Missing_public_key of Signature.Public_key_hash.t (* `Permanent *) | Failure of string (* `Permanent *) | Previously_revealed_key of Contract_repr.t (* `Permanent *) | Unrevealed_manager_key of Contract_repr.t (* `Permanent *)