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 PeerListenTCPKey
|
||||||
data PeerDownloadLogKey
|
data PeerDownloadLogKey
|
||||||
data PeerHttpPortKey
|
data PeerHttpPortKey
|
||||||
data PeerTcpPropWaitKey
|
data PeerTcpProbeWaitKey
|
||||||
data PeerUseHttpDownload
|
data PeerUseHttpDownload
|
||||||
|
|
||||||
instance HasCfgKey PeerListenTCPKey (Maybe String) where
|
instance HasCfgKey PeerListenTCPKey (Maybe String) where
|
||||||
|
@ -53,8 +53,8 @@ instance HasCfgKey PeerListenTCPKey (Maybe String) where
|
||||||
instance HasCfgKey PeerHttpPortKey (Maybe Integer) where
|
instance HasCfgKey PeerHttpPortKey (Maybe Integer) where
|
||||||
key = "http-port"
|
key = "http-port"
|
||||||
|
|
||||||
instance HasCfgKey PeerTcpPropWaitKey (Maybe Integer) where
|
instance HasCfgKey PeerTcpProbeWaitKey (Maybe Integer) where
|
||||||
key = "tcp-prop-wait"
|
key = "tcp-probe-wait"
|
||||||
|
|
||||||
instance HasCfgKey PeerUseHttpDownload FeatureSwitch where
|
instance HasCfgKey PeerUseHttpDownload FeatureSwitch where
|
||||||
key = "http-download"
|
key = "http-download"
|
||||||
|
|
|
@ -743,9 +743,10 @@ runPeer opts = Exception.handle myException $ do
|
||||||
|
|
||||||
peerThread "blockDownloadLoop " (blockDownloadLoop denv)
|
peerThread "blockDownloadLoop " (blockDownloadLoop denv)
|
||||||
|
|
||||||
let tcpPropWait :: Timeout 'Seconds
|
let tcpProbeWait :: Timeout 'Seconds
|
||||||
tcpPropWait = (fromInteger . fromMaybe 300) (cfgValue @PeerTcpPropWaitKey conf)
|
tcpProbeWait = (fromInteger . fromMaybe 300) (cfgValue @PeerTcpProbeWaitKey conf)
|
||||||
peerThread "fillPeerMeta" (fillPeerMeta tcp tcpPropWait)
|
|
||||||
|
peerThread "fillPeerMeta" (fillPeerMeta tcp tcpProbeWait)
|
||||||
|
|
||||||
-- FIXME: clumsy-code
|
-- FIXME: clumsy-code
|
||||||
-- Is it better now ?
|
-- Is it better now ?
|
||||||
|
|
|
@ -49,11 +49,11 @@ fillPeerMeta :: forall e m t .
|
||||||
, IsTimeout t
|
, IsTimeout t
|
||||||
)
|
)
|
||||||
=> Maybe MessagingTCP -> Timeout t -> m ()
|
=> Maybe MessagingTCP -> Timeout t -> m ()
|
||||||
fillPeerMeta mtcp propPeriod = do
|
fillPeerMeta mtcp probePeriod = do
|
||||||
debug "I'm fillPeerMeta"
|
debug "I'm fillPeerMeta"
|
||||||
pl <- getPeerLocator @e
|
pl <- getPeerLocator @e
|
||||||
|
|
||||||
forever $ (>> (pause propPeriod)) $ do
|
forever $ (>> pause probePeriod) $ do
|
||||||
pause @'Seconds 5 -- wait 'till everything calm down
|
pause @'Seconds 5 -- wait 'till everything calm down
|
||||||
|
|
||||||
ps <- knownPeers @e pl
|
ps <- knownPeers @e pl
|
||||||
|
|
Loading…
Reference in New Issue