From 85aef5298e9284eb08e9e4413c849c3b1938dfa8 Mon Sep 17 00:00:00 2001 From: voidlizard Date: Wed, 13 Nov 2024 16:53:14 +0300 Subject: [PATCH] wip --- hbs2-peer/app/BlockDownloadNew.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hbs2-peer/app/BlockDownloadNew.hs b/hbs2-peer/app/BlockDownloadNew.hs index eaa2ab70..c24a3511 100644 --- a/hbs2-peer/app/BlockDownloadNew.hs +++ b/hbs2-peer/app/BlockDownloadNew.hs @@ -665,7 +665,7 @@ downloadDispatcher brains env = flip runContT pure do _sizeCache <- newTVarIO ( mempty :: HashMap HashRef (Maybe Integer) ) - bm <- liftIO $ newBurstMachine 2.5 256 (Just 50) 0.10 0.25 + bm <- liftIO $ newBurstMachine 10 256 (Just 50) 0.10 0.25 void $ ContT $ bracket none $ const do debug $ "Cancelling thread for" <+> pretty p @@ -691,8 +691,8 @@ downloadDispatcher brains env = flip runContT pure do what <- atomically $ readTQueue parseQ missed <- findMissedBlocks sto what now <- getTimeCoarse - atomically do - for_ missed $ \hi -> do + for_ missed $ \hi -> do + atomically do dcb <- newDcbSTM now modifyTVar wip (HPSQ.insert hi 1.0 dcb) @@ -740,7 +740,7 @@ downloadDispatcher brains env = flip runContT pure do if erno > 50 then do pause @'Seconds 60 else do - pause @'Seconds 1.0 + pause @'Seconds 1 go PChoose PInit hx dcb -> do