diff options
Diffstat (limited to 'src/Network/Kademlia/Search.hs')
-rw-r--r-- | src/Network/Kademlia/Search.hs | 4 |
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) | |||
38 | data Search nid addr tok ni r = Search | 38 | data 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 | ||
44 | data SearchState nid addr tok ni r = SearchState | 44 | data 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 |