diff options
author | joe <joe@jerkface.net> | 2016-04-28 12:55:14 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2016-04-28 12:55:14 -0400 |
commit | 7e3eb07aeca78004d7a6879ee846f8e349950292 (patch) | |
tree | f54014f3743f8b15ca52ce75bd35989e22d5e928 /src/Network/BitTorrent/DHT/Routing.hs | |
parent | 08c0b26b28cf0371ba8de3d58c4d4b4fb5f871d8 (diff) |
Todo comment.
Diffstat (limited to 'src/Network/BitTorrent/DHT/Routing.hs')
-rw-r--r-- | src/Network/BitTorrent/DHT/Routing.hs | 4 |
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. | ||
429 | insert :: Eq ip => NodeInfo ip -> Table ip -> ip `Routing` Table ip | 433 | insert :: Eq ip => NodeInfo ip -> Table ip -> ip `Routing` Table ip |
430 | insert info @ NodeInfo {..} = go (0 :: BitIx) | 434 | insert info @ NodeInfo {..} = go (0 :: BitIx) |
431 | where | 435 | where |