mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
settings: implement Default for BanPolicy
This commit is contained in:
@@ -47,6 +47,12 @@ impl std::str::FromStr for BanPolicy {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for BanPolicy {
|
||||
fn default() -> Self {
|
||||
BanPolicy::Strict
|
||||
}
|
||||
}
|
||||
|
||||
/// P2P network settings. The scope of this is a P2P network instance
|
||||
/// configured by the library user.
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -270,6 +276,8 @@ pub struct SettingsOpt {
|
||||
|
||||
/// Do not ban nodes that send messages without dispatchers if set
|
||||
/// to `Relaxed`. For most uses, should be set to `Strict`.
|
||||
#[serde(default)]
|
||||
#[structopt(skip)]
|
||||
pub ban_policy: BanPolicy,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user