From ae4c3358e1e216d0a152ad591e04faa106b4cefa Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 30 Nov 2026 18:13:31 +0000 Subject: 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). --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib.rs') 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> { 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!( "{}", -- cgit v1.3.1