diff --git a/src/Hash2Pub/FediChord.hs b/src/Hash2Pub/FediChord.hs index 4892922..24908a6 100644 --- a/src/Hash2Pub/FediChord.hs +++ b/src/Hash2Pub/FediChord.hs @@ -68,6 +68,7 @@ instance Ord NodeID where wayForwards = getNodeID (b - a) wayBackwards = getNodeID (a - b) +-- | represents a node and all its important state data NodeState = NodeState { id :: NodeID , domain :: String @@ -98,9 +99,10 @@ data NodeState = NodeState { } -- |an entry of the 'nodeCache' -type CacheEntry = (NodeState -- ^a node's data - , SystemTime -- ^timestamp for cache entry expiration - ) +type CacheEntry = ( + NodeState + , SystemTime + ) -- ^ ( a node's data, timestamp for cache entry expiration ) -- Todo: DHT backend can learn potential initial bootstrapping points through the instances mentioned in the received AP-relay messages -- needs to know its own domain anyways for ID generation