Skip to content

Commit

Permalink
Merge pull request #100 from paritytech/nik-toml-to-network
Browse files Browse the repository at this point in the history
  • Loading branch information
wirednkod authored Sep 21, 2023
2 parents 9d44eb3 + 0046708 commit fe91d05
Show file tree
Hide file tree
Showing 15 changed files with 961 additions and 69 deletions.
2 changes: 1 addition & 1 deletion crates/configuration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
regex = { workspace = true }
lazy_static = { workspace = true }
multiaddr = { workspace = true }
url = { workspace = true }
url = { workspace = true, features = ["serde"] }
thiserror = { workspace = true }
anyhow = { workspace = true }
serde = { workspace = true, features = ["derive"] }
Expand Down
6 changes: 3 additions & 3 deletions crates/configuration/src/global_settings.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{error::Error, fmt::Display, net::IpAddr, str::FromStr};

use multiaddr::Multiaddr;
use serde::Serialize;
use serde::{Deserialize, Serialize};

use crate::shared::{
errors::{ConfigError, FieldError},
Expand All @@ -10,9 +10,9 @@ use crate::shared::{
};

/// Global settings applied to an entire network.
#[derive(Debug, Clone, PartialEq, Serialize)]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GlobalSettings {
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
#[serde(skip_serializing_if = "std::vec::Vec::is_empty", default)]
bootnodes_addresses: Vec<Multiaddr>,
// TODO: parse both case in zombienet node version to avoid renamed ?
#[serde(rename = "timeout")]
Expand Down
4 changes: 2 additions & 2 deletions crates/configuration/src/hrmp_channel.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use std::marker::PhantomData;

use serde::Serialize;
use serde::{Deserialize, Serialize};

use crate::shared::{macros::states, types::ParaId};

/// HRMP channel configuration, with fine-grained configuration options.
#[derive(Debug, Clone, PartialEq, Serialize)]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct HrmpChannelConfig {
sender: ParaId,
recipient: ParaId,
Expand Down
1 change: 1 addition & 0 deletions crates/configuration/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::expect_fun_call)]
mod global_settings;
mod hrmp_channel;
mod network;
Expand Down
Loading

0 comments on commit fe91d05

Please sign in to comment.