diff options
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -83,6 +83,15 @@ pub async fn run() -> Result<()> { logging::init(); let config = config::load()?; + if let Some((file, create)) = &config.node_id { + let new = !file.exists(); + 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(()); + } if config.print_only { println!( "{}", |
