diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-09-14 21:30:01 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-09-14 21:30:01 -0400 |
commit | 3a9039eee3465bdd2772abc304658b2c0f9b1a6d (patch) | |
tree | 5a56ee5ca64954a142a96fbf0f73961469b71401 /Storage.hs | |
parent | b6e4a09f1b60e80fe065fd21621902113a1bc9ea (diff) | |
download | keysafe-3a9039eee3465bdd2772abc304658b2c0f9b1a6d.tar.gz |
chaff only the current object size, not old ones
Diffstat (limited to 'Storage.hs')
-rw-r--r-- | Storage.hs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -145,13 +145,13 @@ storeChaff hn port = forever $ do -- Prefix "random chaff" to the name to avoid ever using a name -- that a real user might want to use. let sis = shareIdents testModeTunables (Name $ "random chaff:" <> randomname) (KeyFile "random") - mapConcurrently (go sis rng' (concat (repeat knownObjectSizes))) + mapConcurrently (go sis rng') [1..totalObjects (shareParams testModeTunables)] where server = networkStorage Nothing $ Server hn port - go _ _ [] _ = return () - go sis rng (s:sizes) n = do - let (b, rng') = cprgGenerate s rng + objsize = objectSize defaultTunables * shareOverhead defaultTunables + go sis rng n = do + let (b, rng') = cprgGenerate objsize rng let share = Share 0 (StorableObject b) let (is, sis') = nextShareIdents sis let i = S.toList is !! (n - 1) @@ -160,4 +160,4 @@ storeChaff hn port = forever $ do StoreSuccess -> putStr "+" _ -> putStr "!" hFlush stdout - go sis' rng' sizes n + go sis' rng' n |