diff options
author | joe <joe@jerkface.net> | 2017-11-08 00:05:18 -0500 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-11-08 02:30:43 -0500 |
commit | 709834e3d78f2cec750397bf6f4b6a2ff14e8590 (patch) | |
tree | 0cc3328aa47678f33d8edfada1a59db1ea026069 /src/Network/Kademlia | |
parent | 65a2d2fbeee67dc400f683eaedf88153f0ba9bab (diff) |
Removed redundant argument from BucketRefreshser constructor.
Diffstat (limited to 'src/Network/Kademlia')
-rw-r--r-- | src/Network/Kademlia/Bootstrap.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Network/Kademlia/Bootstrap.hs b/src/Network/Kademlia/Bootstrap.hs index 87fdc22f..3540b24e 100644 --- a/src/Network/Kademlia/Bootstrap.hs +++ b/src/Network/Kademlia/Bootstrap.hs | |||
@@ -73,14 +73,14 @@ data BucketRefresher nid ni = forall tok addr. Ord addr => BucketRefresher | |||
73 | , refreshPing :: ni -> IO Bool | 73 | , refreshPing :: ni -> IO Bool |
74 | } | 74 | } |
75 | 75 | ||
76 | newBucketRefresher :: (Ord addr, Ord a, Hashable a) | 76 | newBucketRefresher :: (Ord addr, Hashable addr, SensibleNodeId nid ni) |
77 | => KademliaSpace a ni | 77 | => ni |
78 | -> ni | ||
79 | -> Search nid addr tok ni ni | 78 | -> Search nid addr tok ni ni |
80 | -> (ni -> IO Bool) | 79 | -> (ni -> IO Bool) |
81 | -> STM (BucketRefresher nid ni) | 80 | -> STM (BucketRefresher nid ni) |
82 | newBucketRefresher spc template_ni sch ping = do | 81 | newBucketRefresher template_ni sch ping = do |
83 | let nodeId = kademliaLocation spc | 82 | let spc = searchSpace sch |
83 | nodeId = kademliaLocation spc | ||
84 | bkts <- newTVar $ R.nullTable (comparing nodeId) (\s -> hashWithSalt s . nodeId) template_ni R.defaultBucketCount | 84 | bkts <- newTVar $ R.nullTable (comparing nodeId) (\s -> hashWithSalt s . nodeId) template_ni R.defaultBucketCount |
85 | sched <- newTVar Int.empty | 85 | sched <- newTVar Int.empty |
86 | return BucketRefresher | 86 | return BucketRefresher |