diff --git a/Hash2Pub/Hash2Pub.cabal b/Hash2Pub/Hash2Pub.cabal index d65eae4..2225792 100644 --- a/Hash2Pub/Hash2Pub.cabal +++ b/Hash2Pub/Hash2Pub.cabal @@ -55,10 +55,10 @@ library import: deps -- Modules exported by the library. - exposed-modules: Hash2Pub.FediChord + exposed-modules: Hash2Pub.FediChord, Hash2Pub.DHTProtocol -- Modules included in this library but not exported. - other-modules: Hash2Pub.Utils, Hash2Pub.DHTProtocol + other-modules: Hash2Pub.Utils -- LANGUAGE extensions used by modules in this package. other-extensions: GeneralizedNewtypeDeriving, DataKinds, OverloadedStrings diff --git a/Hash2Pub/src/Hash2Pub/DHTProtocol.hs b/Hash2Pub/src/Hash2Pub/DHTProtocol.hs index 3378322..1098d85 100644 --- a/Hash2Pub/src/Hash2Pub/DHTProtocol.hs +++ b/Hash2Pub/src/Hash2Pub/DHTProtocol.hs @@ -21,6 +21,7 @@ data QueryResponse = FORWARD [CacheEntry] -- ^return closest nodes from local ca -- the entry time stamp available to the -- protocol serialiser | FOUND NodeState -- ^node is the responsible node for queried ID + deriving (Show, Eq) -- TODO: evaluate more fine-grained argument passing to allow granular locking -- | look up an ID to either claim responsibility for it or return the closest l nodes from the local cache diff --git a/Hash2Pub/src/Hash2Pub/FediChord.hs b/Hash2Pub/src/Hash2Pub/FediChord.hs index 4ca5afc..8bb60f6 100644 --- a/Hash2Pub/src/Hash2Pub/FediChord.hs +++ b/Hash2Pub/src/Hash2Pub/FediChord.hs @@ -120,7 +120,7 @@ data NodeState = NodeState { , jEntriesPerSlice :: Int -- ^ number of desired entries per cache slice -- needs to be parameterisable for simulation purposes - } deriving (Show) + } deriving (Show, Eq) type NodeCache = Map.Map NodeID CacheEntry