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

View File

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

View File

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

View File

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

View File

@ -145,7 +145,7 @@ simpleStorageInit opts = liftIO $ do
<*> TV.newTVarIO False <*> TV.newTVarIO False
<*> TV.newTVarIO mempty <*> TV.newTVarIO mempty
<*> 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 ^. storageBlocks)
createDirectoryIfMissing True (stor ^. storageTemp) createDirectoryIfMissing True (stor ^. storageTemp)