From 9062c405adc5ea311c6f2984adfed439fa5ef0f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Mon, 14 Nov 2016 17:33:32 +0100 Subject: [PATCH] Proto: minor fix in `Storage.Key` --- src/proto/bootstrap/storage.ml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/proto/bootstrap/storage.ml b/src/proto/bootstrap/storage.ml index 74183b50a..88f7b1097 100644 --- a/src/proto/bootstrap/storage.ml +++ b/src/proto/bootstrap/storage.ml @@ -60,6 +60,8 @@ module Key = struct let next_cycle_to_be_rewarded = store_root ["next_cycle_to_be_rewarded"] let rewards = store_root ["rewards"] + let public_keys = ["public_keys" ; "ed25519"] + module Roll = struct let store_root l = store_root ("rolls" :: l) let next = store_root [ "next" ] @@ -88,13 +90,14 @@ module Key = struct module Contract = struct let store_root l = store_root ("contracts" :: l) let set = store_root ["set"] + let pubkey_contract l = store_root ("pubkey" :: l) + let generic_contract l = store_root ("generic" :: l) let contract_store c l = - store_root @@ match c with | Contract_repr.Default k -> - "pubkey" :: Ed25519.hash_path k @ l + pubkey_contract @@ Ed25519.Public_key_hash.to_path k @ l | Contract_repr.Hash h -> - "generic" :: Contract_hash.to_path h @ l + generic_contract @@ Contract_hash.to_path h @ l let roll_list c = contract_store c ["roll_list"] let change c = contract_store c ["change"] let balance c = contract_store c ["balance"] @@ -401,7 +404,7 @@ module Public_key = Make_iterable_data_storage (Ed25519.Public_key_hash) (struct type value = Ed25519.public_key - let key = ["public_keys"] + let key = Key.public_keys let name = "public keys" let encoding = Ed25519.public_key_encoding end)