diff --git a/hbs2-peer/app/PeerConfig.hs b/hbs2-peer/app/PeerConfig.hs index b7312810..9ca18af3 100644 --- a/hbs2-peer/app/PeerConfig.hs +++ b/hbs2-peer/app/PeerConfig.hs @@ -131,11 +131,13 @@ peerConfigRead mbfp = do debug $ pretty cfgPath - confData' <- liftIO $ readFile cfgPath <&> parseTop <&> either mempty id + let parseConf f = liftIO $ readFile f <&> parseTop <&> either mempty id + + confData' <- parseConf cfgPath knownPeersFiles <- mapM (liftIO . canonicalizePath . (dir )) (cfgValue @PeerKnownPeersFile $ PeerConfig confData') - knownPeersConfData <- concat <$> mapM (\file -> liftIO $ readFile file <&> parseTop <&> either mempty id) knownPeersFiles + knownPeersConfData <- concat <$> mapM parseConf knownPeersFiles let confData = confData' <> either mempty id (parseTop peerConfDef) <> knownPeersConfData diff --git a/hbs2-peer/app/PeerMain.hs b/hbs2-peer/app/PeerMain.hs index 148200e1..9233996c 100644 --- a/hbs2-peer/app/PeerMain.hs +++ b/hbs2-peer/app/PeerMain.hs @@ -116,7 +116,6 @@ instance HasCfgKey PeerBlackListKey (Set String) where instance HasCfgKey PeerAcceptAnnounceKey AcceptAnnounce where key = "accept-block-announce" - instance HasCfgValue PeerAcceptAnnounceKey AcceptAnnounce where cfgValue (PeerConfig syn) = fromMaybe (AcceptAnnounceFrom lst) fromAll where