Skip to content
Snippets Groups Projects
Unverified Commit 712a3149 authored by Nikos Kontakis's avatar Nikos Kontakis
Browse files

make private again

parent 769b73a1
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ use crate::{
constants::{NO_ERR_DEF_BUILDER, RELAY_NOT_NONE, RW_FAILED, THIS_IS_A_BUG, VALID_REGEX},
helpers::merge_errors_vecs,
macros::states,
node::NodeConfig,
types::{Arg, ValidationContext},
},
};
......@@ -111,8 +112,15 @@ impl NetworkConfig {
.cloned()
.collect();
let mut nodes: Vec<NodeConfig> = network_config
.relaychain()
.nodes()
.into_iter()
.cloned()
.collect();
// SAFETY: is ok to use `unwrap` here since we ensure that is some at the begging of this fn
for node in network_config.relaychain.as_mut().unwrap().nodes.iter_mut() {
for node in nodes.iter_mut() {
if relaychain_default_command.is_some() {
// we modify only nodes which don't already have a command
if node.command.is_none() {
......
......@@ -25,7 +25,7 @@ pub struct RelaychainConfig {
random_nominators_count: Option<u32>,
max_nominations: Option<u8>,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub(crate) nodes: Vec<NodeConfig>,
nodes: Vec<NodeConfig>,
}
impl RelaychainConfig {
......@@ -59,10 +59,10 @@ impl RelaychainConfig {
self.default_args.iter().collect::<Vec<&Arg>>()
}
/// Set the default arguments that will be used to launch the node command.
pub(crate) fn set_default_args(&mut self, args: Vec<Arg>) {
self.default_args = args;
}
// /// Set the default arguments that will be used to launch the node command.
// pub(crate) fn set_default_args(&mut self, args: Vec<Arg>) {
// self.default_args = args;
// }
/// The location of an pre-existing chain specification for the relay chain.
pub fn chain_spec_path(&self) -> Option<&AssetLocation> {
......@@ -84,10 +84,10 @@ impl RelaychainConfig {
self.nodes.iter().collect::<Vec<&NodeConfig>>()
}
/// The nodes of the relay chain.
pub(crate) fn set_nodes(&mut self, nodes: Vec<NodeConfig>) {
self.nodes = nodes;
}
// /// The nodes of the relay chain.
// pub(crate) fn set_nodes(&mut self, nodes: Vec<NodeConfig>) {
// self.nodes = nodes;
// }
}
states! {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment