stylish fixes

This commit is contained in:
Trolli Schmittlauch 2020-07-02 01:38:51 +02:00
parent edf66e1b51
commit e06c53ff7c
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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