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

Fix the bootnode with serde-default

parent ea376aa2
No related branches found
No related tags found
No related merge requests found
......@@ -66,8 +66,8 @@ pub struct NodeConfig {
pub(crate) is_validator: bool,
#[serde(alias = "invulnerable", default = "default_as_true")]
pub(crate) is_invulnerable: bool,
#[serde(alias = "bootnode")]
pub(crate) is_bootnode: Option<bool>,
#[serde(alias = "bootnode", default)]
pub(crate) is_bootnode: bool,
#[serde(alias = "balance")]
#[serde(default)]
initial_balance: U128,
......@@ -191,7 +191,7 @@ impl NodeConfig {
/// Whether the node is a bootnode.
pub fn is_bootnode(&self) -> bool {
self.is_bootnode.is_some()
self.is_bootnode
}
/// Node initial balance present in genesis.
......@@ -268,7 +268,7 @@ impl Default for NodeConfigBuilder<Initial> {
args: vec![],
is_validator: true,
is_invulnerable: true,
is_bootnode: Some(false),
is_bootnode: false,
initial_balance: 2_000_000_000_000.into(),
env: vec![],
bootnodes_addresses: vec![],
......@@ -434,7 +434,7 @@ impl NodeConfigBuilder<Buildable> {
pub fn bootnode(self, choice: bool) -> Self {
Self::transition(
NodeConfig {
is_bootnode: Some(choice),
is_bootnode: choice,
..self.config
},
self.validation_context,
......
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