summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/DHT/ContactInfo.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/DHT/ContactInfo.hs')
-rw-r--r--src/Network/BitTorrent/DHT/ContactInfo.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/DHT/ContactInfo.hs b/src/Network/BitTorrent/DHT/ContactInfo.hs
index 89c2ec17..c8187772 100644
--- a/src/Network/BitTorrent/DHT/ContactInfo.hs
+++ b/src/Network/BitTorrent/DHT/ContactInfo.hs
@@ -181,6 +181,7 @@ swarmInsert new old = SwarmData
181 where 181 where
182 newerTimeStamp newtime oldtime = if newtime > oldtime then newtime else oldtime 182 newerTimeStamp newtime oldtime = if newtime > oldtime then newtime else oldtime
183 183
184isSwarmOccupied :: SwarmData -> Bool
184isSwarmOccupied SwarmData{..} = not $ PSQ.null peers 185isSwarmOccupied SwarmData{..} = not $ PSQ.null peers
185 186
186-- | Empty store. 187-- | Empty store.
@@ -207,6 +208,7 @@ instance Serialize PeerStore where
207lookup :: InfoHash -> PeerStore -> [PeerAddr] 208lookup :: InfoHash -> PeerStore -> [PeerAddr]
208lookup ih (PeerStore m) = maybe [] (PSQ.keys . peers) $ HM.lookup ih m 209lookup ih (PeerStore m) = maybe [] (PSQ.keys . peers) $ HM.lookup ih m
209 210
211batchSize :: Int
210batchSize = 64 212batchSize = 64
211 213
212-- | Used in 'get_peers' DHT queries. 214-- | Used in 'get_peers' DHT queries.