From 0dd2f5e5d078b735760e097df4204f9778bb193d Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Sat, 8 Dec 2018 23:30:48 -0500 Subject: Integrated cli interface to TCP Kademlia table. --- src/Network/Kademlia/Bootstrap.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Network/Kademlia') diff --git a/src/Network/Kademlia/Bootstrap.hs b/src/Network/Kademlia/Bootstrap.hs index aad8a81e..0f5d4e4d 100644 --- a/src/Network/Kademlia/Bootstrap.hs +++ b/src/Network/Kademlia/Bootstrap.hs @@ -77,14 +77,14 @@ data BucketRefresher nid ni = forall tok addr. Ord addr => BucketRefresher newBucketRefresher :: ( Ord addr, Hashable addr , SensibleNodeId nid ni ) - => ni + => TVar (R.BucketList ni) -> Search nid addr tok ni ni -> (ni -> IO Bool) -> STM (BucketRefresher nid ni) -newBucketRefresher template_ni sch ping = do +newBucketRefresher bkts sch ping = do let spc = searchSpace sch nodeId = kademliaLocation spc - bkts <- newTVar $ R.nullTable (comparing nodeId) (\s -> hashWithSalt s . nodeId) template_ni R.defaultBucketCount + -- bkts <- newTVar $ R.nullTable (comparing nodeId) (\s -> hashWithSalt s . nodeId) template_ni R.defaultBucketCount sched <- newTVar Int.empty lasttouch <- newTVar 0 -- Would use getPOSIXTime here, or minBound, but alas... bootstrapVar <- newTVar True -- Start in bootstrapping mode. -- cgit v1.2.3