summaryrefslogtreecommitdiff
path: root/Mainline.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-07-20 01:11:19 -0400
committerjoe <joe@jerkface.net>2017-07-20 01:11:19 -0400
commiteab23d20425d43445a9fdab9d604344172f092f7 (patch)
tree3a2f166bcca841e50b1c5ef4f5af55f6cb55e2be /Mainline.hs
parent0641750f1e360a0a04f1e2f035a2ac8ed36919f0 (diff)
Updated Search module for rewrite.
Diffstat (limited to 'Mainline.hs')
-rw-r--r--Mainline.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Mainline.hs b/Mainline.hs
index 80834922..8853e920 100644
--- a/Mainline.hs
+++ b/Mainline.hs
@@ -59,10 +59,12 @@ instance FiniteBits NodeId where
59 59
60data NodeInfo = NodeInfo 60data NodeInfo = NodeInfo
61 { nodeId :: NodeId 61 { nodeId :: NodeId
62 , nodeIP :: IP 62 , nodeIP :: IP
63 , nodePort :: PortNumber 63 , nodePort :: PortNumber
64 } 64 }
65 65
66-- The Hashable instance depends only on the IP address and port number. It is
67-- used to compute the announce token.
66instance Hashable NodeInfo where 68instance Hashable NodeInfo where
67 hashWithSalt s ni = hashWithSalt s (nodeIP ni , nodePort ni) 69 hashWithSalt s ni = hashWithSalt s (nodeIP ni , nodePort ni)
68 {-# INLINE hashWithSalt #-} 70 {-# INLINE hashWithSalt #-}