Skip to content

Commit

Permalink
merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
youngjoon-lee committed Sep 12, 2023
1 parent 2ad89c1 commit 6527c50
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nodes/nomos-node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,22 +214,23 @@ impl Config {
} = network_args;

if let Some(IpAddr::V4(h)) = host {
self.network.backend.host = h;
self.network.backend.inner.host = h;

Check warning on line 217 in nodes/nomos-node/src/config.rs

View check run for this annotation

Codecov / codecov/patch

nodes/nomos-node/src/config.rs#L217

Added line #L217 was not covered by tests
} else if host.is_some() {
return Err(eyre!("Unsupported ip version"));
}

if let Some(port) = port {
self.network.backend.port = port as u16;
self.network.backend.inner.port = port as u16;

Check warning on line 223 in nodes/nomos-node/src/config.rs

View check run for this annotation

Codecov / codecov/patch

nodes/nomos-node/src/config.rs#L223

Added line #L223 was not covered by tests
}

if let Some(node_key) = node_key {
let mut key_bytes = hex::decode(node_key)?;
self.network.backend.node_key = SecretKey::try_from_bytes(key_bytes.as_mut_slice())?;
self.network.backend.inner.node_key =
SecretKey::try_from_bytes(key_bytes.as_mut_slice())?;

Check warning on line 229 in nodes/nomos-node/src/config.rs

View check run for this annotation

Codecov / codecov/patch

nodes/nomos-node/src/config.rs#L229

Added line #L229 was not covered by tests
}

if let Some(peers) = initial_peers {
self.network.backend.initial_peers = peers;
self.network.backend.inner.initial_peers = peers;

Check warning on line 233 in nodes/nomos-node/src/config.rs

View check run for this annotation

Codecov / codecov/patch

nodes/nomos-node/src/config.rs#L233

Added line #L233 was not covered by tests
}

Ok(self)
Expand Down

0 comments on commit 6527c50

Please sign in to comment.