diff options
author | James Crayne <jim.crayne@gmail.com> | 2017-10-31 19:01:02 +0000 |
---|---|---|
committer | James Crayne <jim.crayne@gmail.com> | 2017-10-31 19:01:02 +0000 |
commit | 08606959a26b9cbc1ceb8c8396c870612004dd38 (patch) | |
tree | dbeaba9574baf5655bcc7af31569752c329345d6 /src/Network/BitTorrent/DHT/ContactInfo.hs | |
parent | 03ab4e36ade69a953f883d4d6f52f4a023dfda61 (diff) |
obsolete cabal conditional dependency & some missing type sigs
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. |