-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat : provider config file #320
Conversation
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.
Great job! Approved with some comments, but I trust you'll take care of it.
node/src/config.rs
Outdated
|
||
let config = match toml::from_str(&contents) { | ||
Err(err) => { | ||
println!("Fail to parse config file : {}", err); |
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.
Use log::error
if possible.
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.
Also everywhere else in this file
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.
lgtm mod @ffarall's comments
In this PR, we add the possibility to specify a provider config file by using the argument
--provider-config-file=./config.toml
.Expected behaviors when a provider config file is specified :
None
as provider options.--provider-config-file
agrument cannot be used with any others of the provider configurations argument. The CLI will throw an error. It will avoid any conflict between the parameters and make sure the provider configurations are explicit.Error message example :
Error message example in case of missing parameters in config file :