From 895ca5d025fb63d9fab854ac4fffdcdd67ba6767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20K=C3=BChlewindt?= Date: Wed, 2 Jul 2025 16:36:47 +0200 Subject: [PATCH] cli: rad node connect using only NodeId Allow the `rad node connect` command to use only a `NodeId` when connecting. The `NodeId` is used to connect to known addresses, and will stop at the first address that is connected to. --- crates/radicle-cli/src/commands/node.rs | 49 ++++++++++++++++--- .../radicle-cli/src/commands/node/control.rs | 41 ++++++++++++++++ crates/radicle-cli/tests/commands.rs | 43 ++++++++++++++++ 3 files changed, 126 insertions(+), 7 deletions(-) diff --git a/crates/radicle-cli/src/commands/node.rs b/crates/radicle-cli/src/commands/node.rs index 44566c0c..db1be3fe 100644 --- a/crates/radicle-cli/src/commands/node.rs +++ b/crates/radicle-cli/src/commands/node.rs @@ -1,9 +1,11 @@ use std::ffi::OsString; use std::path::PathBuf; +use std::str::FromStr; use std::time; use anyhow::anyhow; +use radicle::node::address::Store as AddressStore; use radicle::node::config::ConnectAddress; use radicle::node::routing::Store; use radicle::node::Handle as _; @@ -35,7 +37,7 @@ Usage rad node stop [