mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(cli): add persistent peers (#1167)
Co-authored-by: lambdaclass-user <github@lambdaclass.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
@ -68,6 +68,19 @@ impl XdgPath for ConfigPath {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the path to the default reth known peers file.
|
||||
///
|
||||
/// Refer to [dirs_next::config_dir] for cross-platform behavior.
|
||||
#[derive(Default, Debug, Clone)]
|
||||
#[non_exhaustive]
|
||||
pub struct KnownPeersPath;
|
||||
|
||||
impl XdgPath for KnownPeersPath {
|
||||
fn resolve() -> Option<PathBuf> {
|
||||
database_path().map(|p| p.join("known-peers.json"))
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the path to the reth logs directory.
|
||||
///
|
||||
/// Refer to [dirs_next::cache_dir] for cross-platform behavior.
|
||||
|
||||
Reference in New Issue
Block a user