summaryrefslogtreecommitdiff
path: root/src/Network/Kademlia/Search.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-11-01 13:57:43 -0400
committerjoe <joe@jerkface.net>2017-11-01 13:57:43 -0400
commit5e9273477eadb124ec984f0363c9e253b907d328 (patch)
treee9adf756a6f042d6a08c9d3e0435bc15233570e9 /src/Network/Kademlia/Search.hs
parent9860107226e9e78c8ac82b287b4fb68262ee1c5b (diff)
Fix some announce bugs. Still WIP.
Diffstat (limited to 'src/Network/Kademlia/Search.hs')
-rw-r--r--src/Network/Kademlia/Search.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Network/Kademlia/Search.hs b/src/Network/Kademlia/Search.hs
index 9d51e815..58c8fad8 100644
--- a/src/Network/Kademlia/Search.hs
+++ b/src/Network/Kademlia/Search.hs
@@ -38,7 +38,7 @@ import GHC.Conc (labelThread)
38data Search nid addr tok ni r = Search 38data Search nid addr tok ni r = Search
39 { searchSpace :: KademliaSpace nid ni 39 { searchSpace :: KademliaSpace nid ni
40 , searchNodeAddress :: ni -> addr 40 , searchNodeAddress :: ni -> addr
41 , searchQuery :: nid -> ni -> IO (Maybe ([ni], [r], tok)) 41 , searchQuery :: nid -> ni -> IO (Maybe ([ni], [r], Maybe tok))
42 } 42 }
43 43
44data SearchState nid addr tok ni r = SearchState 44data SearchState nid addr tok ni r = SearchState
@@ -61,7 +61,7 @@ data SearchState nid addr tok ni r = SearchState
61 -- | Nodes scheduled to be queried. 61 -- | Nodes scheduled to be queried.
62 , searchQueued :: TVar (MinMaxPSQ ni nid) 62 , searchQueued :: TVar (MinMaxPSQ ni nid)
63 -- | The nearest K nodes that issued a reply. 63 -- | The nearest K nodes that issued a reply.
64 , searchInformant :: TVar (MinMaxPSQ' ni nid tok) 64 , searchInformant :: TVar (MinMaxPSQ' ni nid (Maybe tok))
65 -- | This tracks already-queried addresses so we avoid bothering them 65 -- | This tracks already-queried addresses so we avoid bothering them
66 -- again. XXX: We could probably keep only the pending queries in this 66 -- again. XXX: We could probably keep only the pending queries in this
67 -- set. It also can be a bounded 'MinMaxPSQ', although searchAlpha 67 -- set. It also can be a bounded 'MinMaxPSQ', although searchAlpha