diff --git a/binaries/cuprated/src/config/p2p.rs b/binaries/cuprated/src/config/p2p.rs index 5a3d5008..51f8d0d6 100644 --- a/binaries/cuprated/src/config/p2p.rs +++ b/binaries/cuprated/src/config/p2p.rs @@ -6,7 +6,7 @@ use std::{ use serde::{Deserialize, Serialize}; -use cuprate_helper::{fs::addressbook_path, network::Network}; +use cuprate_helper::{fs::address_book_path, network::Network}; /// P2P config. #[derive(Default, Deserialize, Serialize)] @@ -102,7 +102,7 @@ impl SharedNetConfig { cuprate_address_book::AddressBookConfig { max_white_list_length: self.address_book_config.max_white_list_length, max_gray_list_length: self.address_book_config.max_gray_list_length, - peer_store_directory: addressbook_path(cache_dir, network), + peer_store_directory: address_book_path(cache_dir, network), peer_save_period: self.address_book_config.peer_save_period, } } diff --git a/helper/src/fs.rs b/helper/src/fs.rs index 60d61a37..f694f62d 100644 --- a/helper/src/fs.rs +++ b/helper/src/fs.rs @@ -205,13 +205,13 @@ pub fn txpool_path(data_dir: &Path, network: Network) -> PathBuf { /// This is the PATH used for any Cuprate address-book files. /// /// ```rust -/// use cuprate_helper::{network::Network, fs::{CUPRATE_CACHE_DIR, addressbook_path}}; +/// use cuprate_helper::{network::Network, fs::{CUPRATE_CACHE_DIR, address_book_path}}; /// -/// assert_eq!(addressbook_path(&**CUPRATE_CACHE_DIR, Network::Mainnet).as_path(), CUPRATE_CACHE_DIR.join("addressbook")); -/// assert_eq!(addressbook_path(&**CUPRATE_CACHE_DIR, Network::Stagenet).as_path(), CUPRATE_CACHE_DIR.join(Network::Stagenet.to_string()).join("addressbook")); -/// assert_eq!(addressbook_path(&**CUPRATE_CACHE_DIR, Network::Testnet).as_path(), CUPRATE_CACHE_DIR.join(Network::Testnet.to_string()).join("addressbook")); +/// assert_eq!(address_book_path(&**CUPRATE_CACHE_DIR, Network::Mainnet).as_path(), CUPRATE_CACHE_DIR.join("addressbook")); +/// assert_eq!(address_book_path(&**CUPRATE_CACHE_DIR, Network::Stagenet).as_path(), CUPRATE_CACHE_DIR.join(Network::Stagenet.to_string()).join("addressbook")); +/// assert_eq!(address_book_path(&**CUPRATE_CACHE_DIR, Network::Testnet).as_path(), CUPRATE_CACHE_DIR.join(Network::Testnet.to_string()).join("addressbook")); /// ``` -pub fn addressbook_path(cache_dir: &Path, network: Network) -> PathBuf { +pub fn address_book_path(cache_dir: &Path, network: Network) -> PathBuf { path_with_network(cache_dir, network).join("addressbook") }