diff options
Diffstat (limited to 'src/Network/BitTorrent/DHT/ContactInfo.hs')
-rw-r--r-- | src/Network/BitTorrent/DHT/ContactInfo.hs | 2 |
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 | ||
184 | isSwarmOccupied :: SwarmData -> Bool | ||
184 | isSwarmOccupied SwarmData{..} = not $ PSQ.null peers | 185 | isSwarmOccupied SwarmData{..} = not $ PSQ.null peers |
185 | 186 | ||
186 | -- | Empty store. | 187 | -- | Empty store. |
@@ -207,6 +208,7 @@ instance Serialize PeerStore where | |||
207 | lookup :: InfoHash -> PeerStore -> [PeerAddr] | 208 | lookup :: InfoHash -> PeerStore -> [PeerAddr] |
208 | lookup ih (PeerStore m) = maybe [] (PSQ.keys . peers) $ HM.lookup ih m | 209 | lookup ih (PeerStore m) = maybe [] (PSQ.keys . peers) $ HM.lookup ih m |
209 | 210 | ||
211 | batchSize :: Int | ||
210 | batchSize = 64 | 212 | batchSize = 64 |
211 | 213 | ||
212 | -- | Used in 'get_peers' DHT queries. | 214 | -- | Used in 'get_peers' DHT queries. |