summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/MainlineDHT.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2018-12-08 23:30:48 -0500
committerJoe Crayne <joe@jerkface.net>2018-12-16 14:08:26 -0500
commit0dd2f5e5d078b735760e097df4204f9778bb193d (patch)
treea752a8f9e97e1aac44b641c928e8d7d32a7178d9 /src/Network/BitTorrent/MainlineDHT.hs
parentdf6292eef942c11b9ac58b337f29641dae404116 (diff)
Integrated cli interface to TCP Kademlia table.
Diffstat (limited to 'src/Network/BitTorrent/MainlineDHT.hs')
-rw-r--r--src/Network/BitTorrent/MainlineDHT.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Network/BitTorrent/MainlineDHT.hs b/src/Network/BitTorrent/MainlineDHT.hs
index 573efcba..a29657af 100644
--- a/src/Network/BitTorrent/MainlineDHT.hs
+++ b/src/Network/BitTorrent/MainlineDHT.hs
@@ -563,11 +563,11 @@ newClient swarms addr = do
563 -- have a client to send queries with. 563 -- have a client to send queries with.
564 let nullPing = const $ return False 564 let nullPing = const $ return False
565 nullSearch = mainlineSearch $ \_ _ -> return Nothing 565 nullSearch = mainlineSearch $ \_ _ -> return Nothing
566 refresher4 <- newBucketRefresher tentative_info nullSearch nullPing 566 tbl4 <- newTVar $ R.nullTable (comparing nodeId) (\s -> hashWithSalt s . nodeId) tentative_info R.defaultBucketCount
567 refresher6 <- newBucketRefresher tentative_info6 nullSearch nullPing 567 refresher4 <- newBucketRefresher tbl4 nullSearch nullPing
568 let tbl4 = refreshBuckets refresher4 568 tbl6 <- newTVar $ R.nullTable (comparing nodeId) (\s -> hashWithSalt s . nodeId) tentative_info6 R.defaultBucketCount
569 tbl6 = refreshBuckets refresher6 569 refresher6 <- newBucketRefresher tbl6 nullSearch nullPing
570 updateIPVote tblvar addrvar a = do 570 let updateIPVote tblvar addrvar a = do
571 bkts <- readTVar tblvar 571 bkts <- readTVar tblvar
572 case bep42 a (nodeId $ R.thisNode bkts) of 572 case bep42 a (nodeId $ R.thisNode bkts) of
573 Just nid -> do 573 Just nid -> do