diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-11-29 17:33:49 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-11-29 17:33:49 -0400 |
commit | 698bf9c9efa87cc2345f174f0a62185f47760485 (patch) | |
tree | 7f8d2e9905855388673b9d0b23c17ed2585f838d /P2P/Address.hs | |
parent | c75ff07b143e1917fe65abeddd221fa3252fb02d (diff) |
comments
Diffstat (limited to 'P2P/Address.hs')
-rw-r--r-- | P2P/Address.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/P2P/Address.hs b/P2P/Address.hs index 315219683..862f06a9c 100644 --- a/P2P/Address.hs +++ b/P2P/Address.hs @@ -51,10 +51,12 @@ instance FormatP2PAddress P2PAddressAuth where authtoken <- toAuthToken (T.pack $ reverse ra) return (P2PAddressAuth addr authtoken) +-- | Load known P2P addresses for this repository. loadP2PAddresses :: Annex [P2PAddress] loadP2PAddresses = mapMaybe unformatP2PAddress . maybe [] lines <$> readCacheCreds p2pAddressCredsFile +-- | Store a new P2P address for this repository. storeP2PAddress :: P2PAddress -> Annex () storeP2PAddress addr = do addrs <- loadP2PAddresses |