This commit is contained in:
Dmitry Zuikov 2023-04-01 10:36:56 +03:00
parent 56c0ac4bc1
commit f27cfbfabb
4 changed files with 10 additions and 12 deletions

View File

@ -13,14 +13,15 @@ defMessageQueueSize :: Integral a => a
defMessageQueueSize = 65536*10
defBurst :: Integral a => a
defBurst = 4
defBurst = 8
defBurstMax :: Integral a => a
defBurstMax = 64
-- defChunkSize :: Integer
defChunkSize :: Integral a => a
defChunkSize = 1200
defChunkSize = 1400
-- defChunkSize = 480
defBlockSize :: Integer
defBlockSize = 256 * 1024
@ -69,21 +70,21 @@ defBlockWipTimeout :: TimeSpec
defBlockWipTimeout = defCookieTimeout
defBlockInfoTimeout :: Timeout 'Seconds
defBlockInfoTimeout = 5
defBlockInfoTimeout = 60
defBlockInfoTimeoutSpec :: TimeSpec
defBlockInfoTimeoutSpec = toTimeSpec defBlockInfoTimeout
-- how much time wait for block from peer?
defBlockWaitMax :: Timeout 'Seconds
defBlockWaitMax = 5 :: Timeout 'Seconds
defBlockWaitMax = 120 :: Timeout 'Seconds
-- how much time wait for block from peer?
defChunkWaitMax :: Timeout 'Seconds
defChunkWaitMax = 3 :: Timeout 'Seconds
defChunkWaitMax = 60 :: Timeout 'Seconds
defSweepTimeout :: Timeout 'Seconds
defSweepTimeout = 30 -- FIXME: only for debug!
defSweepTimeout = 60 -- FIXME: only for debug!
defPeerAnnounceTime :: Timeout 'Seconds
defPeerAnnounceTime = 120
@ -106,6 +107,4 @@ defUsefulLimit = 0.25
defInterBlockDelay :: Timeout 'Seconds
defInterBlockDelay = 0.0085
defBlockReqNum :: Integral a => a
defBlockReqNum = 2

View File

@ -128,7 +128,7 @@ instance Expires (SessionKey UDP (KnownPeer UDP)) where
expiresIn _ = Just 3600
instance Expires (SessionKey UDP (PeerHandshake UDP)) where
expiresIn _ = Just 10
expiresIn _ = Just 60
instance Expires (EventKey UDP (PeerAnnounce UDP)) where
expiresIn _ = Nothing

View File

@ -172,7 +172,7 @@ instance Expires (EventKey e (PeerHandshake e)) where
expiresIn _ = Nothing
instance Expires (EventKey e (ConcretePeer e)) where
expiresIn _ = Just 10
expiresIn _ = Just 60
instance Hashable (Peer e) => Hashable (EventKey e (PeerHandshake e))

View File

@ -110,8 +110,7 @@ deriving instance Eq (Nonce (PeerExchange e)) => Eq (SessionKey e (PeerExchange
instance Hashable (Nonce (PeerExchange e)) => Hashable (SessionKey e (PeerExchange e))
instance Expires (SessionKey e (PeerExchange e)) where
expiresIn _ = Just 10
expiresIn _ = Just 60
instance Typeable (PeerExchangePeersEv e)
=> Hashable (EventKey e (PeerExchangePeersEv e)) where