-
Notifications
You must be signed in to change notification settings - Fork 648
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
Revert commit b7ae96f as the bitshares/bitshares-ui#1338 is complete #1049
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.
thanls @jmjatlanta
Please be careful since it will break old clients (due to quality control of bitshares-ui project, I guess quite some people are still using old versions). |
What steps can we take to minimize the impact? We'll have it in the release notes, but I'd imagine most ui users could care less about core changes. We could delay this change to a later release. But I don't know if we want to do that or not. Opinions? Other ideas? |
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.
GUI is ready and required code in core is uncommented. Seems everything is fine here. Thanks !
Let's do it in next release. Need to resolve conflicts now. |
e02ad1f
libraries/app/application.cpp
Outdated
@@ -943,12 +942,11 @@ void application::set_program_options(boost::program_options::options_descriptio | |||
("api-access", bpo::value<boost::filesystem::path>(), "JSON file specifying API permissions") | |||
("plugins", bpo::value<string>(), "Space-separated list of plugins to activate") | |||
("io-threads", bpo::value<uint16_t>()->implicit_value(0), "Number of IO threads, default to 0 for auto-configuration") | |||
("enable-subscribe-to-all", bpo::value<bool>()->implicit_value(false), |
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.
I think the implicit value should be true
which is more natural.
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.
See comment above.
@@ -38,7 +38,7 @@ namespace graphene { namespace app { | |||
class application_options | |||
{ | |||
public: | |||
bool enable_subscribe_to_all = false; | |||
bool enable_subscribe_to_all = true; |
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.
Don't change this one to true
.
Sorry, my above comment was not clear enough. Expected behavior:
- this option is disabled by default (if not specified in config.ini nor startup parameters);
- if a user specified it in parameters or config.ini, if without
=X
(only--enable-subscribe-to-all
but not--enable-subscribe-to-all=true
), consider the value istrue
.
I believe I have done what you asked @abitmore but please check. Either I am doing something wrong, or there is a side-effect here.
I believe that the default |
If this was a dynamically typed language this is exactly the sort of behaviour I'd expect if the value of enable-subscribe-to-all in config.ini was stored as a string and then evaluated as a Boolean. Seeing as this is C++, I have no idea |
I guess @clockworkgr is correct. For example, the |
libraries/app/application.cpp
Outdated
@@ -410,7 +410,7 @@ void application_impl::startup() | |||
} | |||
|
|||
if( _options->count("enable-subscribe-to-all") ) | |||
_app_options.enable_subscribe_to_all = _options->at("enable-subscribe-to-all").as<bool>(); |
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.
Sorry, I didn't get it, what's wrong with _options->at("enable-subscribe-to-all").as<bool>();
?
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.
If you don't add the command line option, you get an index out of range error.
Update: Okay, I see what you mean. I'm fixing it.
Okay, I have fixed the config.ini problem. It was an error in my logic, as @abitmore pointed out. Now the command line and config.ini file work as expected. A 1/0 or true/false can work in config.ini as expected. |
libraries/app/application.cpp
Outdated
@@ -409,8 +409,8 @@ void application_impl::startup() | |||
_force_validate = true; | |||
} | |||
|
|||
if( _options->count("enable-subscribe-to-all") ) | |||
_app_options.enable_subscribe_to_all = true; | |||
if (_options->count("enable-subscribe-to-all")) |
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 change the white-spaces? :P
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.
:-P
The issue bitshares/bitshares-ui#1338 is now complete. Now defaulting the parameter
enable_subscribe_to_all
tofalse
A bit of history: This parameter was documented incorrectly, which caused the ui to send
true
, which in turn caused the API server to spam the clients with unwanted notifications. Now that the bitshares-ui has been corrected, we can default this parameter tofalse
and avoid sending these unwanted notifications.PR for #752.