-
Notifications
You must be signed in to change notification settings - Fork 224
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
Conversation
…description working
mixnode/src/node/node_description.rs
Outdated
} | ||
|
||
impl NodeDescription { | ||
pub(crate) fn load_from_file(mut config_path: PathBuf) -> io::Result<NodeDescription> { |
There was a problem hiding this comment.
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.
mixnode/src/node/node_description.rs
Outdated
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) |
There was a problem hiding this comment.
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
?
No description provided.