From 5e9273477eadb124ec984f0363c9e253b907d328 Mon Sep 17 00:00:00 2001 From: joe Date: Wed, 1 Nov 2017 13:57:43 -0400 Subject: Fix some announce bugs. Still WIP. --- src/Network/Kademlia/Search.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Network/Kademlia/Search.hs') 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) data Search nid addr tok ni r = Search { searchSpace :: KademliaSpace nid ni , searchNodeAddress :: ni -> addr - , searchQuery :: nid -> ni -> IO (Maybe ([ni], [r], tok)) + , searchQuery :: nid -> ni -> IO (Maybe ([ni], [r], Maybe tok)) } data SearchState nid addr tok ni r = SearchState @@ -61,7 +61,7 @@ data SearchState nid addr tok ni r = SearchState -- | Nodes scheduled to be queried. , searchQueued :: TVar (MinMaxPSQ ni nid) -- | The nearest K nodes that issued a reply. - , searchInformant :: TVar (MinMaxPSQ' ni nid tok) + , searchInformant :: TVar (MinMaxPSQ' ni nid (Maybe tok)) -- | This tracks already-queried addresses so we avoid bothering them -- again. XXX: We could probably keep only the pending queries in this -- set. It also can be a bounded 'MinMaxPSQ', although searchAlpha -- cgit v1.2.3