little bit better

This commit is contained in:
Dmitry Zuikov 2023-01-27 11:07:38 +03:00
parent c2af04b79f
commit 2f4bfe1cfb
2 changed files with 6 additions and 5 deletions

View File

@ -297,7 +297,7 @@ runPeerM s bus p f = do
<*> liftIO (newTVarIO mempty)
let de = view envDeferred env
as <- liftIO $ replicateM 4 $ async $ runPipeline de
as <- liftIO $ replicateM 8 $ async $ runPipeline de
sw <- liftIO $ async $ forever $ withPeerM env $ do
pause defSweepTimeout

View File

@ -159,8 +159,8 @@ runTestPeer p zu = do
stor <- simpleStorageInit opts
cww <- newChunkWriterIO stor (Just chDir)
sw <- liftIO $ replicateM 4 $ async $ simpleStorageWorker stor
cw <- liftIO $ replicateM 4 $ async $ runChunkWriter cww
sw <- liftIO $ replicateM 32 $ async $ simpleStorageWorker stor
cw <- liftIO $ replicateM 8 $ async $ runChunkWriter cww
zu stor cww
@ -404,8 +404,9 @@ blockDownloadLoop cw = do
if fromIntegral wrt >= thisBkSize then do
h1 <- liftIO $ getHash cw key h
if | h1 == Just h -> do
liftIO $ commitBlock cw key h
expire @e key
pure ()
-- liftIO $ commitBlock cw key h
-- expire @e key
| h1 /= Just h -> do
debug "block fucked"