diff options
Diffstat (limited to 'src/config/mod.rs')
| -rw-r--r-- | src/config/mod.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index b8a2ba0..4222212 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -227,14 +227,14 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ Kind::Text, "PATH", None, - "Key of a private Mycelium network for the supervised daemon.", + "Key of a private Mycelium network for the supervised daemon (with mycelium-network-name).", ), option( "mycelium-network-name", Kind::Text, "NAME", None, - "Name of that private Mycelium network.", + "Name of that private Mycelium network (with mycelium-network-key-file).", ), option( "mycelium-tcp-listen-port", @@ -378,6 +378,10 @@ impl Settings { ); } } + // A private network has both; one alone would be ignored or invented. + if self.mycelium_network_key_file.is_some() != self.mycelium_network_name.is_some() { + bail!("mycelium-network-key-file and mycelium-network-name go together"); + } crate::force::Force::parse(self.force.iter().map(String::as_str), FORCE) .map_err(|reason| anyhow!("force: {reason}"))?; // Contradictions, not overrides: an error wherever the options come from. |
