Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
cli: fix casing for warning of preferred_seeds
Merged fintohaps opened 3 months ago

While the field name will preferred_seeds in Rust, the casing for the JSON file is preferredSeeds.

3 files changed +7 -5 91eb6fc0 c33c26fa
modified crates/radicle-cli/examples/rad-warn-old-nodes.md
@@ -39,7 +39,7 @@ $ rad debug
  },
  "warnings": [
    "Value of configuration option `node.connect` at index 0 mentions node with address 'ash.radicle.garden:8776', which has been renamed to 'rosa.radicle.xyz:8776'. Please update your configuration.",
-
    "Value of configuration option `preferred_seeds` at index 0 mentions node with address 'seed.radicle.garden:8776', which has been renamed to 'iris.radicle.xyz:8776'. Please update your configuration."
+
    "Value of configuration option `preferredSeeds` at index 0 mentions node with address 'seed.radicle.garden:8776', which has been renamed to 'iris.radicle.xyz:8776'. Please update your configuration."
  ]
}
```
@@ -49,7 +49,7 @@ Also, `rad node status` will warn us:
```
$ rad node status
! Warning: Value of configuration option `node.connect` at index 0 mentions node with address 'ash.radicle.garden:8776', which has been renamed to 'rosa.radicle.xyz:8776'. Please update your configuration.
-
! Warning: Value of configuration option `preferred_seeds` at index 0 mentions node with address 'seed.radicle.garden:8776', which has been renamed to 'iris.radicle.xyz:8776'. Please update your configuration.
+
! Warning: Value of configuration option `preferredSeeds` at index 0 mentions node with address 'seed.radicle.garden:8776', which has been renamed to 'iris.radicle.xyz:8776'. Please update your configuration.
Node is stopped.
To start it, run `rad node start`.
-
```

\ No newline at end of file
+
```
modified crates/radicle-cli/src/warning.rs
@@ -39,7 +39,7 @@ fn nodes_renamed_for_option(
pub(crate) fn nodes_renamed(config: &Config) -> Vec<String> {
    let mut warnings = nodes_renamed_for_option("node.connect", config.node.connect.clone());
    warnings.extend(nodes_renamed_for_option(
-
        "preferred_seeds",
+
        "preferredSeeds",
        config.preferred_seeds.clone(),
    ));
    warnings
modified crates/radicle-protocol/src/service.rs
@@ -221,7 +221,9 @@ pub enum ConnectError {
    SelfConnection,
    #[error("outbound connection limit reached when attempting {nid} ({addr})")]
    LimitReached { nid: NodeId, addr: Address },
-
    #[error("attempted connection to {nid}, via {addr} but addresses of this kind are not supported")]
+
    #[error(
+
        "attempted connection to {nid}, via {addr} but addresses of this kind are not supported"
+
    )]
    UnsupportedAddress { nid: NodeId, addr: Address },
}