aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-30 18:13:31 +0000
committertv <tv@krebsco.de>2026-11-30 18:13:31 +0000
commitae4c3358e1e216d0a152ad591e04faa106b4cefa (patch)
treee58d81708b936c868005a9bc98c81cc8fa0c038b /src/lib.rs
parent4deaec75e49b7f0853c2b82bbcce129d19dcff51 (diff)
continuum node-id needs none of a node's configuration
It was answered after the node's configuration was read and checked, which asked for htpasswd, a node key file and the rest: what a party's founders don't have yet as they ask for their nodes' IDs, and the guides tell them to run it alone. It is answered before now (config::asked_node_id).
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index b57f6a5..a420555 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -81,16 +81,16 @@ fn voter(args: &config::Settings) -> Result<Option<federation::held::Voter>> {
pub async fn run() -> Result<()> {
logging::init();
- let config = config::load()?;
- if let Some((file, create)) = &config.node_id {
+ if let Some((file, create)) = config::asked_node_id() {
let new = !file.exists();
- let key = identity::NodeKey::load(file, *create)?;
+ let key = identity::NodeKey::load(&file, create)?;
if new {
eprintln!("a new node key in {}: a new node", file.display());
}
println!("{}", key.id());
return Ok(());
}
+ let config = config::load()?;
if config.print_only {
println!(
"{}",