summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent')
-rw-r--r--src/Network/BitTorrent/DHT/Routing.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/DHT/Routing.hs b/src/Network/BitTorrent/DHT/Routing.hs
index cb3cf273..81624b2a 100644
--- a/src/Network/BitTorrent/DHT/Routing.hs
+++ b/src/Network/BitTorrent/DHT/Routing.hs
@@ -426,6 +426,10 @@ splitTip nid n i bucket
426 (zeros, ones) = split i bucket 426 (zeros, ones) = split i bucket
427 427
428-- | Used in each query. 428-- | Used in each query.
429--
430-- TODO: Kademlia non-empty subtrees should should split if they have less than
431-- k nodes in them. Which subtrees I mean is illustrated in Fig 1. of Kademlia
432-- paper. The rule requiring additional splits is in section 2.4.
429insert :: Eq ip => NodeInfo ip -> Table ip -> ip `Routing` Table ip 433insert :: Eq ip => NodeInfo ip -> Table ip -> ip `Routing` Table ip
430insert info @ NodeInfo {..} = go (0 :: BitIx) 434insert info @ NodeInfo {..} = go (0 :: BitIx)
431 where 435 where