diff options
author | joe <joe@jerkface.net> | 2017-06-13 00:16:32 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-06-13 00:16:32 -0400 |
commit | bad22a9e32512c78298adbf6654eac2ac3524bbe (patch) | |
tree | ddbf134c10227cbef9da9bfd880cd27fb44462d9 /src/Network/BitTorrent/DHT | |
parent | 602ce9260950a0eb91cefe4603af5de2443e2fea (diff) |
Changed comments for haddock parsing.
Diffstat (limited to 'src/Network/BitTorrent/DHT')
-rw-r--r-- | src/Network/BitTorrent/DHT/Query.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Network/BitTorrent/DHT/Query.hs b/src/Network/BitTorrent/DHT/Query.hs index ae072db0..9162abdc 100644 --- a/src/Network/BitTorrent/DHT/Query.hs +++ b/src/Network/BitTorrent/DHT/Query.hs | |||
@@ -259,7 +259,7 @@ isearch f ih = do | |||
259 | tid <- myThreadId | 259 | tid <- myThreadId |
260 | labelThread tid ("search."++show ih) | 260 | labelThread tid ("search."++show ih) |
261 | Search.search s | 261 | Search.search s |
262 | -- atomically $ readTVar (Search.searchResults s) | 262 | -- atomically \$ readTVar (Search.searchResults s) |
263 | return (a, s) | 263 | return (a, s) |
264 | 264 | ||
265 | 265 | ||
@@ -298,11 +298,11 @@ refreshNodes nid = do | |||
298 | $(logDebugS) "routing.refresh_bucket" (T.pack (render (pPrint nid))) | 298 | $(logDebugS) "routing.refresh_bucket" (T.pack (render (pPrint nid))) |
299 | nodes <- getClosest nid | 299 | nodes <- getClosest nid |
300 | do | 300 | do |
301 | -- forM (L.take 1 nodes) $ \ addr -> do | 301 | -- forM (L.take 1 nodes) \$ \ addr -> do |
302 | -- NodeFound ns <- FindNode nid <@> addr | 302 | -- NodeFound ns <- FindNode nid <@> addr |
303 | -- Expected type: ConduitM [NodeAddr ip] [NodeInfo KMessageOf ip ()] (DHT ip) () | 303 | -- Expected type: ConduitM [NodeAddr ip] [NodeInfo KMessageOf ip ()] (DHT ip) () |
304 | -- Actual type: ConduitM [NodeInfo KMessageOf ip ()] [NodeInfo KMessageOf ip ()] (DHT ip) () | 304 | -- Actual type: ConduitM [NodeInfo KMessageOf ip ()] [NodeInfo KMessageOf ip ()] (DHT ip) () |
305 | -- nss <- sourceList [[addr]] $= search nid (findNodeQ nid) $$ C.consume | 305 | -- nss <- sourceList [[addr]] \$= search nid (findNodeQ nid) $$ C.consume |
306 | nss <- sourceList [nodes] $= search nid (findNodeQ nid) $$ C.consume | 306 | nss <- sourceList [nodes] $= search nid (findNodeQ nid) $$ C.consume |
307 | $(logWarnS) "refreshNodes" $ "received " <> T.pack (show (L.length (L.concat nss))) <> " nodes." | 307 | $(logWarnS) "refreshNodes" $ "received " <> T.pack (show (L.length (L.concat nss))) <> " nodes." |
308 | _ <- queryParallel $ flip L.map (L.concat nss) $ \n -> do | 308 | _ <- queryParallel $ flip L.map (L.concat nss) $ \n -> do |
@@ -310,7 +310,7 @@ refreshNodes nid = do | |||
310 | pingQ (nodeAddr n) | 310 | pingQ (nodeAddr n) |
311 | -- pingQ takes care of inserting the node. | 311 | -- pingQ takes care of inserting the node. |
312 | return () | 312 | return () |
313 | return () -- $ L.concat nss | 313 | return () -- \$ L.concat nss |
314 | 314 | ||
315 | -- | This operation do not block but acquire exclusive access to | 315 | -- | This operation do not block but acquire exclusive access to |
316 | -- routing table. | 316 | -- routing table. |
@@ -398,7 +398,7 @@ queryNode' addr q = do | |||
398 | let read_only = False -- TODO: check for NAT issues. (BEP 43) | 398 | let read_only = False -- TODO: check for NAT issues. (BEP 43) |
399 | let KRPC.Method name = KRPC.method :: KRPC.Method (Query a) (Response b) | 399 | let KRPC.Method name = KRPC.method :: KRPC.Method (Query a) (Response b) |
400 | (Response remoteId r, witnessed_ip) <- query' name (toSockAddr addr) (Query nid read_only q) | 400 | (Response remoteId r, witnessed_ip) <- query' name (toSockAddr addr) (Query nid read_only q) |
401 | -- $(logDebugS) "queryNode" $ "Witnessed address: " <> T.pack (show witnessed_ip) | 401 | -- \$(logDebugS) "queryNode" $ "Witnessed address: " <> T.pack (show witnessed_ip) |
402 | -- <> " by " <> T.pack (show (toSockAddr addr)) | 402 | -- <> " by " <> T.pack (show (toSockAddr addr)) |
403 | _ <- insertNode (NodeInfo remoteId addr ()) witnessed_ip | 403 | _ <- insertNode (NodeInfo remoteId addr ()) witnessed_ip |
404 | return (remoteId, r, witnessed_ip) | 404 | return (remoteId, r, witnessed_ip) |