From ce92f70883be182fb2578272a31370f87979c5ea Mon Sep 17 00:00:00 2001 From: Pietro Date: Tue, 13 Mar 2018 16:04:10 +0100 Subject: [PATCH] P2p: Fix Hashtbl for PeerRing Export hash in INTERNAL_HASH. now Peer_id.Id is hashable --- src/lib_crypto/s.ml | 2 ++ src/lib_p2p/p2p_acl.ml | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib_crypto/s.ml b/src/lib_crypto/s.ml index 77c837e84..5ed5bfef9 100644 --- a/src/lib_crypto/s.ml +++ b/src/lib_crypto/s.ml @@ -95,6 +95,8 @@ module type INDEXES = sig type t + val hash : t -> int + val to_path: t -> string list -> string list val of_path: string list -> t option val of_path_exn: string list -> t diff --git a/src/lib_p2p/p2p_acl.ml b/src/lib_p2p/p2p_acl.ml index 34686c7b3..3d551f55e 100644 --- a/src/lib_p2p/p2p_acl.ml +++ b/src/lib_p2p/p2p_acl.ml @@ -9,7 +9,6 @@ module PeerRing = Ring.MakeTable(struct include P2p_peer.Id - let hash = Hashtbl.hash end) module PatriciaTree(V:HashPtree.Value) = struct