diff options
author | joe <joe@jerkface.net> | 2017-07-17 23:17:50 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-07-17 23:17:50 -0400 |
commit | 745a4dd8826f474ac7cabd9897744f86fe5a9142 (patch) | |
tree | 91a51220dd88633abc9b21fd4791f0f054a2467f /src/Network/DHT | |
parent | 156caf1027ebf46b6fae97fbfa5664e9c417eea4 (diff) |
Implement clientAddress for Mainline DHT.
Diffstat (limited to 'src/Network/DHT')
-rw-r--r-- | src/Network/DHT/Routing.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Network/DHT/Routing.hs b/src/Network/DHT/Routing.hs index 0eb1078b..273cf9dc 100644 --- a/src/Network/DHT/Routing.hs +++ b/src/Network/DHT/Routing.hs | |||
@@ -550,6 +550,9 @@ tableBits testbit (BucketList self _ bkts) = | |||
550 | zipWith const (map (testbit self) [0..]) | 550 | zipWith const (map (testbit self) [0..]) |
551 | bkts | 551 | bkts |
552 | 552 | ||
553 | selfNode :: BucketList ni -> ni | ||
554 | selfNode (BucketList self _ _) = self | ||
555 | |||
553 | chunksOf :: Int -> [e] -> [[e]] | 556 | chunksOf :: Int -> [e] -> [[e]] |
554 | chunksOf i ls = map (take i) (build (splitter ls)) where | 557 | chunksOf i ls = map (take i) (build (splitter ls)) where |
555 | splitter :: [e] -> ([e] -> a -> a) -> a -> a | 558 | splitter :: [e] -> ([e] -> a -> a) -> a -> a |