Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zombienet-sdk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
zombienet-sdk
Commits
712a3149
Unverified
Commit
712a3149
authored
1 year ago
by
Nikos Kontakis
Browse files
Options
Downloads
Patches
Plain Diff
make private again
parent
769b73a1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
crates/configuration/src/network.rs
+9
-1
9 additions, 1 deletion
crates/configuration/src/network.rs
crates/configuration/src/relaychain.rs
+9
-9
9 additions, 9 deletions
crates/configuration/src/relaychain.rs
with
18 additions
and
10 deletions
crates/configuration/src/network.rs
+
9
−
1
View file @
712a3149
...
...
@@ -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
()
{
...
...
This diff is collapsed.
Click to expand it.
crates/configuration/src/relaychain.rs
+
9
−
9
View file @
712a3149
...
...
@@ -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!
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment