summaryrefslogtreecommitdiff
path: root/src/Network/Kademlia/Bootstrap.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/Kademlia/Bootstrap.hs')
-rw-r--r--src/Network/Kademlia/Bootstrap.hs6
1 files changed, 3 insertions, 3 deletions
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
77 77
78newBucketRefresher :: ( Ord addr, Hashable addr 78newBucketRefresher :: ( Ord addr, Hashable addr
79 , SensibleNodeId nid ni ) 79 , SensibleNodeId nid ni )
80 => ni 80 => TVar (R.BucketList ni)
81 -> Search nid addr tok ni ni 81 -> Search nid addr tok ni ni
82 -> (ni -> IO Bool) 82 -> (ni -> IO Bool)
83 -> STM (BucketRefresher nid ni) 83 -> STM (BucketRefresher nid ni)
84newBucketRefresher template_ni sch ping = do 84newBucketRefresher bkts sch ping = do
85 let spc = searchSpace sch 85 let spc = searchSpace sch
86 nodeId = kademliaLocation spc 86 nodeId = kademliaLocation spc
87 bkts <- newTVar $ R.nullTable (comparing nodeId) (\s -> hashWithSalt s . nodeId) template_ni R.defaultBucketCount 87 -- bkts <- newTVar $ R.nullTable (comparing nodeId) (\s -> hashWithSalt s . nodeId) template_ni R.defaultBucketCount
88 sched <- newTVar Int.empty 88 sched <- newTVar Int.empty
89 lasttouch <- newTVar 0 -- Would use getPOSIXTime here, or minBound, but alas... 89 lasttouch <- newTVar 0 -- Would use getPOSIXTime here, or minBound, but alas...
90 bootstrapVar <- newTVar True -- Start in bootstrapping mode. 90 bootstrapVar <- newTVar True -- Start in bootstrapping mode.