-
Notifications
You must be signed in to change notification settings - Fork 14
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
[DO NOT review/merge it - just proposal] Separated config reading code from the rest logic #157
base: development/v.0.0.2
Are you sure you want to change the base?
Conversation
class ConfigLoader | ||
{ | ||
public: | ||
ConfigLoader(void); |
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.
Why do you need (void)? Is C somewhere assumed?
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.
void is not related to C or C++. What the problem?
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.
It is most definitely related to C and is only even allowed in C++ because it needs to be compatible with C code. (But since this is a constructor it is especially pointless since C compatibility isn't even possible in the first place). See the C++ Core Guideline's strong recommendation against this.
size_t stake_wallet_refresh_interval_ms; | ||
|
||
std::string watchonly_wallets_path; // path to watch-only wallets (supernodes) | ||
bool testnet; // testnet flag |
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.
Why not "bool testnet = false;" or ""bool testnet = {}" instead of "Config(void);" ?
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.
Because I'd prefer use One way of initialization instead of two different ways.
And we can't always initialize all things inplace.
DISCLAIMER:
DO NOT Review it
DO NOT Merge it
Only for discussing.
Just proposal.
Statements/changes
graft::supernode::ConfigLoader. It does load data from command-line + ini-file into appropriate structure.
Decomposition of RouterT