mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 22:10:31 +08:00
node: Update Config Default instance
Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
+12
-1
@@ -141,7 +141,7 @@ pub enum RemoteTracking {
|
||||
}
|
||||
|
||||
/// Protocol configuration.
|
||||
#[derive(Debug, Default)]
|
||||
#[derive(Debug)]
|
||||
pub struct Config {
|
||||
/// Peers to connect to on startup.
|
||||
/// Connections to these peers will be maintained.
|
||||
@@ -154,6 +154,17 @@ pub struct Config {
|
||||
pub relay: bool,
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
connect: Vec::default(),
|
||||
project_tracking: ProjectTracking::default(),
|
||||
remote_tracking: RemoteTracking::default(),
|
||||
relay: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn is_persistent(&self, addr: &net::SocketAddr) -> bool {
|
||||
self.connect.contains(addr)
|
||||
|
||||
Reference in New Issue
Block a user