fix types and packaging to make inserting testable
This commit is contained in:
parent
aed80263a7
commit
f4847da295
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue