summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/DHT/Routing.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-01-22 18:11:58 -0500
committerjoe <joe@jerkface.net>2017-01-22 18:11:58 -0500
commite7c2f98454a4e52b7e7b62b49f91b59cfc77a91b (patch)
tree40ae4586e590f88c56a4d4d4e8a8d669f9b23944 /src/Network/BitTorrent/DHT/Routing.hs
parent8cf4de73d77197032fd8ebfc4e4f3a00b287e0e7 (diff)
PSQ instead of list for peer set. Also: dhtd "swarms" command.
Diffstat (limited to 'src/Network/BitTorrent/DHT/Routing.hs')
-rw-r--r--src/Network/BitTorrent/DHT/Routing.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/DHT/Routing.hs b/src/Network/BitTorrent/DHT/Routing.hs
index 38207be5..8a6849a1 100644
--- a/src/Network/BitTorrent/DHT/Routing.hs
+++ b/src/Network/BitTorrent/DHT/Routing.hs
@@ -460,7 +460,7 @@ compatibleNodeId tbl = genBucketSample prefix br
460 where 460 where
461 br = bucketRange (L.length (shape tbl) - 1) True 461 br = bucketRange (L.length (shape tbl) - 1) True
462 bs = BS.pack $ take nodeIdSize $ tablePrefix tbl ++ repeat 0 462 bs = BS.pack $ take nodeIdSize $ tablePrefix tbl ++ repeat 0
463 prefix = NodeId bs 463 prefix = asNodeId bs
464 464
465tablePrefix :: Table ip -> [Word8] 465tablePrefix :: Table ip -> [Word8]
466tablePrefix = map (packByte . take 8 . (++repeat False)) 466tablePrefix = map (packByte . take 8 . (++repeat False))