mirror of https://github.com/voidlizard/hbs2
rtt
This commit is contained in:
parent
56c0ac4bc1
commit
f27cfbfabb
|
@ -13,14 +13,15 @@ defMessageQueueSize :: Integral a => a
|
||||||
defMessageQueueSize = 65536*10
|
defMessageQueueSize = 65536*10
|
||||||
|
|
||||||
defBurst :: Integral a => a
|
defBurst :: Integral a => a
|
||||||
defBurst = 4
|
defBurst = 8
|
||||||
|
|
||||||
defBurstMax :: Integral a => a
|
defBurstMax :: Integral a => a
|
||||||
defBurstMax = 64
|
defBurstMax = 64
|
||||||
|
|
||||||
-- defChunkSize :: Integer
|
-- defChunkSize :: Integer
|
||||||
defChunkSize :: Integral a => a
|
defChunkSize :: Integral a => a
|
||||||
defChunkSize = 1200
|
defChunkSize = 1400
|
||||||
|
-- defChunkSize = 480
|
||||||
|
|
||||||
defBlockSize :: Integer
|
defBlockSize :: Integer
|
||||||
defBlockSize = 256 * 1024
|
defBlockSize = 256 * 1024
|
||||||
|
@ -69,21 +70,21 @@ defBlockWipTimeout :: TimeSpec
|
||||||
defBlockWipTimeout = defCookieTimeout
|
defBlockWipTimeout = defCookieTimeout
|
||||||
|
|
||||||
defBlockInfoTimeout :: Timeout 'Seconds
|
defBlockInfoTimeout :: Timeout 'Seconds
|
||||||
defBlockInfoTimeout = 5
|
defBlockInfoTimeout = 60
|
||||||
|
|
||||||
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 = 5 :: Timeout 'Seconds
|
defBlockWaitMax = 120 :: Timeout 'Seconds
|
||||||
|
|
||||||
-- how much time wait for block from peer?
|
-- how much time wait for block from peer?
|
||||||
defChunkWaitMax :: Timeout 'Seconds
|
defChunkWaitMax :: Timeout 'Seconds
|
||||||
defChunkWaitMax = 3 :: Timeout 'Seconds
|
defChunkWaitMax = 60 :: Timeout 'Seconds
|
||||||
|
|
||||||
defSweepTimeout :: Timeout 'Seconds
|
defSweepTimeout :: Timeout 'Seconds
|
||||||
defSweepTimeout = 30 -- FIXME: only for debug!
|
defSweepTimeout = 60 -- FIXME: only for debug!
|
||||||
|
|
||||||
defPeerAnnounceTime :: Timeout 'Seconds
|
defPeerAnnounceTime :: Timeout 'Seconds
|
||||||
defPeerAnnounceTime = 120
|
defPeerAnnounceTime = 120
|
||||||
|
@ -106,6 +107,4 @@ defUsefulLimit = 0.25
|
||||||
defInterBlockDelay :: Timeout 'Seconds
|
defInterBlockDelay :: Timeout 'Seconds
|
||||||
defInterBlockDelay = 0.0085
|
defInterBlockDelay = 0.0085
|
||||||
|
|
||||||
defBlockReqNum :: Integral a => a
|
|
||||||
defBlockReqNum = 2
|
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ instance Expires (SessionKey UDP (KnownPeer UDP)) where
|
||||||
expiresIn _ = Just 3600
|
expiresIn _ = Just 3600
|
||||||
|
|
||||||
instance Expires (SessionKey UDP (PeerHandshake UDP)) where
|
instance Expires (SessionKey UDP (PeerHandshake UDP)) where
|
||||||
expiresIn _ = Just 10
|
expiresIn _ = Just 60
|
||||||
|
|
||||||
instance Expires (EventKey UDP (PeerAnnounce UDP)) where
|
instance Expires (EventKey UDP (PeerAnnounce UDP)) where
|
||||||
expiresIn _ = Nothing
|
expiresIn _ = Nothing
|
||||||
|
|
|
@ -172,7 +172,7 @@ instance Expires (EventKey e (PeerHandshake e)) where
|
||||||
expiresIn _ = Nothing
|
expiresIn _ = Nothing
|
||||||
|
|
||||||
instance Expires (EventKey e (ConcretePeer e)) where
|
instance Expires (EventKey e (ConcretePeer e)) where
|
||||||
expiresIn _ = Just 10
|
expiresIn _ = Just 60
|
||||||
|
|
||||||
instance Hashable (Peer e) => Hashable (EventKey e (PeerHandshake e))
|
instance Hashable (Peer e) => Hashable (EventKey e (PeerHandshake e))
|
||||||
|
|
||||||
|
|
|
@ -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 Hashable (Nonce (PeerExchange e)) => Hashable (SessionKey e (PeerExchange e))
|
||||||
|
|
||||||
instance Expires (SessionKey e (PeerExchange e)) where
|
instance Expires (SessionKey e (PeerExchange e)) where
|
||||||
expiresIn _ = Just 10
|
expiresIn _ = Just 60
|
||||||
|
|
||||||
|
|
||||||
instance Typeable (PeerExchangePeersEv e)
|
instance Typeable (PeerExchangePeersEv e)
|
||||||
=> Hashable (EventKey e (PeerExchangePeersEv e)) where
|
=> Hashable (EventKey e (PeerExchangePeersEv e)) where
|
||||||
|
|
Loading…
Reference in New Issue