This commit is contained in:
voidlizard 2024-11-03 20:49:59 +03:00
parent 63bd5c0aa6
commit 90412a21b5
4 changed files with 9 additions and 9 deletions

View File

@ -70,14 +70,14 @@ defBlockWipTimeout :: TimeSpec
defBlockWipTimeout = defCookieTimeout
defBlockInfoTimeout :: Timeout 'Seconds
defBlockInfoTimeout = 5
defBlockInfoTimeout = 2
defBlockInfoTimeoutSpec :: TimeSpec
defBlockInfoTimeoutSpec = toTimeSpec defBlockInfoTimeout
-- how much time wait for block from peer?
defBlockWaitMax :: Timeout 'Seconds
defBlockWaitMax = 60 :: Timeout 'Seconds
defBlockWaitMax = 30 :: Timeout 'Seconds
-- how much time wait for block from peer?
defChunkWaitMax :: Timeout 'Seconds

View File

@ -51,7 +51,7 @@ import Streaming.Prelude qualified as S
-- FIXME: control-recv-capacity-to-avoid-leaks
outMessageQLen :: Natural
outMessageQLen = 256
outMessageQLen = 1024*32
-- | TCP Messaging environment
data MessagingTCP =
@ -106,7 +106,7 @@ newMessagingTCP pa = liftIO do
<*> newTVarIO mempty
<*> newTVarIO mempty
<*> newTQueueIO
<*> newTBQueueIO outMessageQLen
<*> newTBQueueIO (10 * outMessageQLen)
<*> newTVarIO mempty
<*> newTVarIO 0
<*> newTVarIO mempty

View File

@ -320,8 +320,8 @@ blockDownloadLoop env0 = do
e <- ask
sto <- getStorage
let downT = 8
let sizeT = 1
let downT = 16
let sizeT = 16
inQ <- withDownload env0 $ asks (view blockInQ)
checkQ <- withDownload env0 $ asks (view blockCheckQ)
@ -677,8 +677,8 @@ blockDownloadLoop env0 = do
updateRates e rates nonces = withPeerM e do
let wRtt = 5
let wUdp = 1.5
let wTcp = 1.1
let wUdp = 1.75
let wTcp = 0.95
let wS = 1.5
let eps = 1e-8

View File

@ -145,7 +145,7 @@ simpleStorageInit opts = liftIO $ do
<*> TV.newTVarIO False
<*> TV.newTVarIO mempty
<*> TV.newTVarIO mempty
<*> Cache.newCache (Just (toTimeSpec (10 :: Timeout 'Seconds)))
<*> Cache.newCache (Just (toTimeSpec (60 :: Timeout 'Seconds)))
createDirectoryIfMissing True (stor ^. storageBlocks)
createDirectoryIfMissing True (stor ^. storageTemp)