key_hash now comparable

This commit is contained in:
Lesenechal Remi 2020-01-06 21:31:54 +01:00
parent 6841609362
commit 55a8734c81

View File

@ -15,6 +15,7 @@ module Ty = struct
let tez_k = Mutez_key None let tez_k = Mutez_key None
let int_k = Int_key None let int_k = Int_key None
let string_k = String_key None let string_k = String_key None
let key_hash_k = Key_hash_key None
let address_k = Address_key None let address_k = Address_key None
let timestamp_k = Timestamp_key None let timestamp_k = Timestamp_key None
let bytes_k = Bytes_key None let bytes_k = Bytes_key None
@ -72,7 +73,7 @@ module Ty = struct
| Base_operation -> fail (not_comparable "operation") | Base_operation -> fail (not_comparable "operation")
| Base_signature -> fail (not_comparable "signature") | Base_signature -> fail (not_comparable "signature")
| Base_key -> fail (not_comparable "key") | Base_key -> fail (not_comparable "key")
| Base_key_hash -> fail (not_comparable "key_hash") | Base_key_hash -> return key_hash_k
| Base_chain_id -> fail (not_comparable "chain_id") | Base_chain_id -> fail (not_comparable "chain_id")
let comparable_type : type_value -> ex_comparable_ty result = fun tv -> let comparable_type : type_value -> ex_comparable_ty result = fun tv ->