summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Network/Kademlia/Search.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Network/Kademlia/Search.hs b/src/Network/Kademlia/Search.hs
index 5f024cd0..9d51e815 100644
--- a/src/Network/Kademlia/Search.hs
+++ b/src/Network/Kademlia/Search.hs
@@ -105,7 +105,7 @@ reset :: (Ord ni, Ord nid, Hashable ni, Hashable nid) =>
105 -> Search nid addr1 tok1 ni r1 105 -> Search nid addr1 tok1 ni r1
106 -> nid 106 -> nid
107 -> SearchState nid addr tok ni r 107 -> SearchState nid addr tok ni r
108 -> STM () 108 -> STM (SearchState nid addr tok ni r)
109reset bkts qsearch target st = do 109reset bkts qsearch target st = do
110 searchIsFinished st >>= check -- Wait for a search to finish before resetting. 110 searchIsFinished st >>= check -- Wait for a search to finish before resetting.
111 bktNodes <- map (\ni -> ni :-> kademliaLocation (searchSpace qsearch) ni) 111 bktNodes <- map (\ni -> ni :-> kademliaLocation (searchSpace qsearch) ni)
@@ -116,6 +116,7 @@ reset bkts qsearch target st = do
116 writeTVar (searchInformant st) MM.empty 116 writeTVar (searchInformant st) MM.empty
117 writeTVar (searchVisited st) Set.empty 117 writeTVar (searchVisited st) Set.empty
118 writeTVar (searchPendingCount st) 0 118 writeTVar (searchPendingCount st) 0
119 return st
119 120
120searchAlpha :: Int 121searchAlpha :: Int
121searchAlpha = 8 122searchAlpha = 8