summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2016-04-28 12:55:14 -0400
committerjoe <joe@jerkface.net>2016-04-28 12:55:14 -0400
commit7e3eb07aeca78004d7a6879ee846f8e349950292 (patch)
treef54014f3743f8b15ca52ce75bd35989e22d5e928 /src
parent08c0b26b28cf0371ba8de3d58c4d4b4fb5f871d8 (diff)
Todo comment.
Diffstat (limited to 'src')
-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