refactor vservers map to RingMap to be able to index it
- in preparation for periodical rebalancing - makes it possible to look up the next vserver for iterating through it, after refreshing the map in-between - added some necessary RingMap functions
This commit is contained in:
parent
bb0fb0919a
commit
5ed8a28fde
5 changed files with 43 additions and 17 deletions
|
@ -19,6 +19,7 @@ import Hash2Pub.ASN1Coding
|
|||
import Hash2Pub.DHTProtocol
|
||||
import Hash2Pub.FediChord
|
||||
import Hash2Pub.FediChordTypes
|
||||
import Hash2Pub.RingMap
|
||||
|
||||
spec :: Spec
|
||||
spec = do
|
||||
|
@ -304,7 +305,7 @@ exampleNodeState = RemoteNodeState {
|
|||
exampleLocalNode :: IO (LocalNodeState MockService)
|
||||
exampleLocalNode = do
|
||||
realNodeSTM <- newTVarIO $ RealNode {
|
||||
vservers = HMap.empty
|
||||
vservers = emptyRMap
|
||||
, nodeConfig = exampleFediConf
|
||||
, bootstrapNodes = confBootstrapNodes exampleFediConf
|
||||
, nodeService = MockService
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue