|
|
@@ -70,6 +70,8 @@ pub struct Settings {
|
|
|
pub hostlist: String,
|
|
|
/// Pause interval within greylist refinery process
|
|
|
pub greylist_refinery_interval: u64,
|
|
|
+ /// Pause interval before redoing a self-handshake
|
|
|
+ pub self_handshake_interval: u64,
|
|
|
/// Percent of connections to come from the whitelist
|
|
|
pub white_connect_count: u32,
|
|
|
/// Number of anchorlist connections
|
|
|
@@ -107,6 +109,7 @@ impl Default for Settings {
|
|
|
outbound_peer_discovery_attempt_time: 5,
|
|
|
hostlist: "/dev/null".to_string(),
|
|
|
greylist_refinery_interval: 15,
|
|
|
+ self_handshake_interval: 600,
|
|
|
white_connect_count: 90,
|
|
|
anchor_connect_count: 2,
|
|
|
time_with_no_connections: 30,
|
|
|
@@ -205,6 +208,10 @@ pub struct SettingsOpt {
|
|
|
#[structopt(skip)]
|
|
|
pub greylist_refinery_interval: Option<u64>,
|
|
|
|
|
|
+ /// Pause interval before redoing a self-handshake
|
|
|
+ #[structopt(skip)]
|
|
|
+ pub self_handshake_interval: Option<u64>,
|
|
|
+
|
|
|
/// Number of whitelist connections
|
|
|
#[structopt(skip)]
|
|
|
pub white_connect_count: Option<u32>,
|
|
|
@@ -261,6 +268,9 @@ impl From<SettingsOpt> for Settings {
|
|
|
greylist_refinery_interval: opt
|
|
|
.greylist_refinery_interval
|
|
|
.unwrap_or(def.greylist_refinery_interval),
|
|
|
+ self_handshake_interval: opt
|
|
|
+ .self_handshake_interval
|
|
|
+ .unwrap_or(def.self_handshake_interval),
|
|
|
white_connect_count: opt.white_connect_count.unwrap_or(def.white_connect_count),
|
|
|
anchor_connect_count: opt.anchor_connect_count.unwrap_or(def.anchor_connect_count),
|
|
|
time_with_no_connections: opt
|