mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 18:25:30 +00:00
aquatic_ws: remove unused config keys
This commit is contained in:
parent
e00dcaa5c3
commit
65851fa544
1 changed files with 1 additions and 19 deletions
|
|
@ -21,7 +21,6 @@ pub struct Config {
|
||||||
pub network: NetworkConfig,
|
pub network: NetworkConfig,
|
||||||
pub protocol: ProtocolConfig,
|
pub protocol: ProtocolConfig,
|
||||||
pub cleaning: CleaningConfig,
|
pub cleaning: CleaningConfig,
|
||||||
pub statistics: StatisticsConfig,
|
|
||||||
pub privileges: PrivilegeConfig,
|
pub privileges: PrivilegeConfig,
|
||||||
pub access_list: AccessListConfig,
|
pub access_list: AccessListConfig,
|
||||||
pub cpu_pinning: CpuPinningConfig,
|
pub cpu_pinning: CpuPinningConfig,
|
||||||
|
|
@ -63,15 +62,6 @@ pub struct CleaningConfig {
|
||||||
pub interval: u64,
|
pub interval: u64,
|
||||||
/// Remove peers that haven't announced for this long (seconds)
|
/// Remove peers that haven't announced for this long (seconds)
|
||||||
pub max_peer_age: u64,
|
pub max_peer_age: u64,
|
||||||
/// Remove connections that are older than this (seconds)
|
|
||||||
pub max_connection_age: u64,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
||||||
#[serde(default)]
|
|
||||||
pub struct StatisticsConfig {
|
|
||||||
/// Print statistics this often (seconds). Don't print when set to zero.
|
|
||||||
pub interval: u64,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Config {
|
impl Default for Config {
|
||||||
|
|
@ -83,7 +73,6 @@ impl Default for Config {
|
||||||
network: NetworkConfig::default(),
|
network: NetworkConfig::default(),
|
||||||
protocol: ProtocolConfig::default(),
|
protocol: ProtocolConfig::default(),
|
||||||
cleaning: CleaningConfig::default(),
|
cleaning: CleaningConfig::default(),
|
||||||
statistics: StatisticsConfig::default(),
|
|
||||||
privileges: PrivilegeConfig::default(),
|
privileges: PrivilegeConfig::default(),
|
||||||
access_list: AccessListConfig::default(),
|
access_list: AccessListConfig::default(),
|
||||||
cpu_pinning: Default::default(),
|
cpu_pinning: Default::default(),
|
||||||
|
|
@ -107,7 +96,7 @@ impl Default for NetworkConfig {
|
||||||
impl Default for ProtocolConfig {
|
impl Default for ProtocolConfig {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
max_scrape_torrents: 255, // FIXME: what value is reasonable?
|
max_scrape_torrents: 255,
|
||||||
max_offers: 10,
|
max_offers: 10,
|
||||||
peer_announce_interval: 120,
|
peer_announce_interval: 120,
|
||||||
}
|
}
|
||||||
|
|
@ -119,13 +108,6 @@ impl Default for CleaningConfig {
|
||||||
Self {
|
Self {
|
||||||
interval: 30,
|
interval: 30,
|
||||||
max_peer_age: 1800,
|
max_peer_age: 1800,
|
||||||
max_connection_age: 1800,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for StatisticsConfig {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self { interval: 0 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue