reorganize numcopies code (no behavior changes)
Move stuff into Logs.NumCopies. Add a NumCopies newtype. Better names for various serialization classes that are specific to one thing or another.
This commit is contained in:
parent
e38a21a768
commit
b40df4f0d0
20 changed files with 137 additions and 98 deletions
2
Limit.hs
2
Limit.hs
|
@ -197,7 +197,7 @@ limitNumCopiesNeeded want = case readish want of
|
|||
gv <- getGlobalNumCopies
|
||||
case gv of
|
||||
Nothing -> return False
|
||||
Just numcopies -> do
|
||||
Just (NumCopies numcopies) -> do
|
||||
us <- filter (`S.notMember` notpresent)
|
||||
<$> (trustExclude UnTrusted =<< Remote.keyLocations key)
|
||||
return $ numcopies - length us >= needed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue