From 8fe93b8e1d1d968bdf0b8a35335b060d92a9d7d7 Mon Sep 17 00:00:00 2001 From: joe Date: Sat, 8 Jul 2017 22:10:40 -0400 Subject: WIP: Tox encryption. --- src/Network/BitTorrent/DHT.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Network/BitTorrent/DHT.hs') diff --git a/src/Network/BitTorrent/DHT.hs b/src/Network/BitTorrent/DHT.hs index fa8071d5..2535c05c 100644 --- a/src/Network/BitTorrent/DHT.hs +++ b/src/Network/BitTorrent/DHT.hs @@ -234,7 +234,7 @@ bootstrap :: forall raw dht u ip. , Show u , Default u , Serialize u - ) => Maybe BS.ByteString -> [NodeAddr ip] -> DHT raw dht u ip () + ) => Maybe BS.ByteString -> [PacketDestination dht] -> DHT raw dht u ip () bootstrap mbs startNodes = do restored <- case decode <$> mbs of @@ -250,7 +250,7 @@ bootstrap mbs startNodes = do return ( ns :: [NodeInfo dht ip u] ) input_nodes <- (restored ++) . T.toList <$> getTable -- Step 1: Use iterative searches to flesh out the table.. - do let knowns = map (map $ nodeAddr . fst) input_nodes + do let knowns = map (map $ fst) input_nodes -- Below, we reverse the nodes since the table serialization puts the -- nearest nodes last and we want to choose a similar node id to bootstrap -- faster. @@ -265,7 +265,7 @@ bootstrap mbs startNodes = do when (null ns) $ do -- TODO filter duplicated in startNodes list -- TODO retransmissions for startNodes - (aliveNodes,_) <- unzip <$> queryParallel (pingQ <$> startNodes) + (aliveNodes,_) <- unzip <$> queryParallel (coldPingQ <$> startNodes) _ <- searchAll $ take 2 aliveNodes return () -- Step 2: Repeatedly refresh incomplete buckets until the table is full. -- cgit v1.2.3