Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add node description api #605

Merged
merged 17 commits into from
May 19, 2021
Merged

Conversation

futurechimp
Copy link
Contributor

No description provided.

common/mixnode-common/src/rtt_measurement/mod.rs Outdated Show resolved Hide resolved
mixnode/src/commands/describe.rs Show resolved Hide resolved
mixnode/src/commands/describe.rs Outdated Show resolved Hide resolved
mixnode/src/node/http/description.rs Outdated Show resolved Hide resolved
}

impl NodeDescription {
pub(crate) fn load_from_file(mut config_path: PathBuf) -> io::Result<NodeDescription> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this (and save_to_file) be given config_path as arguments? Should it rather be node_description_path? Also, as I've mentioned before, I think it should be part of config itself.

pub(crate) fn load_from_file(mut config_path: PathBuf) -> io::Result<NodeDescription> {
config_path.push("descriptor.json");
let json = fs::read_to_string(config_path)?;
::serde_json::from_str(&json)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason for the strange mixture of json and toml? I.e. we're saving node configuration in a .toml file but for some reason we save description as a .json?

@jstuczyn jstuczyn merged commit 190d3c4 into develop May 19, 2021
@jstuczyn jstuczyn deleted the feature/add-node-description-api branch May 19, 2021 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants