From e06c53ff7cd334f94c8ee097ff20f4996f6b0900 Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Thu, 2 Jul 2020 01:38:51 +0200 Subject: [PATCH] stylish fixes --- src/Hash2Pub/FediChord.hs | 6 +++--- test/FediChordSpec.hs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Hash2Pub/FediChord.hs b/src/Hash2Pub/FediChord.hs index 6667a3e..152abd9 100644 --- a/src/Hash2Pub/FediChord.hs +++ b/src/Hash2Pub/FediChord.hs @@ -231,7 +231,7 @@ cacheVerifyThread nsSTM = forever $ do ) pong else pure () ) - + -- check the cache invariant per slice and, if necessary, do a single lookup to the -- middle of each slice not verifying the invariant latestNs <- readTVarIO nsSTM @@ -243,7 +243,7 @@ cacheVerifyThread nsSTM = forever $ do forM_ (checkCacheSliceInvariants latestNs latestCache) (\targetID -> forkIO $ sendQueryIdMessages targetID latestNs (Just (1 + jEntriesPerSlice latestNs)) (nodesToQuery targetID) >> pure () -- ask for 1 entry more than j because of querying the middle ) - + putStrLn "cache verify run: end" threadDelay $ 10^6 * round maxEntryAge `div` 20 @@ -255,7 +255,7 @@ checkCacheSliceInvariants :: LocalNodeState -> NodeCache -> [NodeID] -- ^ list of middle IDs of slices not -- ^ fulfilling the invariant -checkCacheSliceInvariants ns +checkCacheSliceInvariants ns | isJoined ns = checkPredecessorSlice jEntries (getNid ns) startBound lastPred <> checkSuccessorSlice jEntries (getNid ns) startBound lastSucc | otherwise = const [] where diff --git a/test/FediChordSpec.hs b/test/FediChordSpec.hs index 545c3dd..1e94628 100644 --- a/test/FediChordSpec.hs +++ b/test/FediChordSpec.hs @@ -276,7 +276,7 @@ spec = do ownNode <- setNid ownId <$> exampleLocalNode let (FORWARD qResult) = queryLocalCache ownNode bootstrapCache 2 ownId remoteNode (head $ Set.elems qResult) `shouldBe` bootstrapNode - + -- some example data