mirror of https://github.com/voidlizard/hbs2
typo fixed
This commit is contained in:
parent
69b7a56695
commit
e3dca38522
|
@ -44,7 +44,7 @@ pattern Key n ns <- SymbolVal n : ns
|
|||
data PeerListenTCPKey
|
||||
data PeerDownloadLogKey
|
||||
data PeerHttpPortKey
|
||||
data PeerTcpPropWaitKey
|
||||
data PeerTcpProbeWaitKey
|
||||
data PeerUseHttpDownload
|
||||
|
||||
instance HasCfgKey PeerListenTCPKey (Maybe String) where
|
||||
|
@ -53,8 +53,8 @@ instance HasCfgKey PeerListenTCPKey (Maybe String) where
|
|||
instance HasCfgKey PeerHttpPortKey (Maybe Integer) where
|
||||
key = "http-port"
|
||||
|
||||
instance HasCfgKey PeerTcpPropWaitKey (Maybe Integer) where
|
||||
key = "tcp-prop-wait"
|
||||
instance HasCfgKey PeerTcpProbeWaitKey (Maybe Integer) where
|
||||
key = "tcp-probe-wait"
|
||||
|
||||
instance HasCfgKey PeerUseHttpDownload FeatureSwitch where
|
||||
key = "http-download"
|
||||
|
|
|
@ -743,9 +743,10 @@ runPeer opts = Exception.handle myException $ do
|
|||
|
||||
peerThread "blockDownloadLoop " (blockDownloadLoop denv)
|
||||
|
||||
let tcpPropWait :: Timeout 'Seconds
|
||||
tcpPropWait = (fromInteger . fromMaybe 300) (cfgValue @PeerTcpPropWaitKey conf)
|
||||
peerThread "fillPeerMeta" (fillPeerMeta tcp tcpPropWait)
|
||||
let tcpProbeWait :: Timeout 'Seconds
|
||||
tcpProbeWait = (fromInteger . fromMaybe 300) (cfgValue @PeerTcpProbeWaitKey conf)
|
||||
|
||||
peerThread "fillPeerMeta" (fillPeerMeta tcp tcpProbeWait)
|
||||
|
||||
-- FIXME: clumsy-code
|
||||
-- Is it better now ?
|
||||
|
|
|
@ -49,11 +49,11 @@ fillPeerMeta :: forall e m t .
|
|||
, IsTimeout t
|
||||
)
|
||||
=> Maybe MessagingTCP -> Timeout t -> m ()
|
||||
fillPeerMeta mtcp propPeriod = do
|
||||
fillPeerMeta mtcp probePeriod = do
|
||||
debug "I'm fillPeerMeta"
|
||||
pl <- getPeerLocator @e
|
||||
|
||||
forever $ (>> (pause propPeriod)) $ do
|
||||
forever $ (>> pause probePeriod) $ do
|
||||
pause @'Seconds 5 -- wait 'till everything calm down
|
||||
|
||||
ps <- knownPeers @e pl
|
||||
|
|
Loading…
Reference in New Issue