From d370b3f883a1d4e8da65f397120a19f6e24c48f8 Mon Sep 17 00:00:00 2001 From: John Jones Date: Wed, 13 Jun 2018 06:27:09 -0500 Subject: [PATCH 1/6] Revert commit b7ae96f as the bitshares/bitshares-ui#1338 is complete --- libraries/app/application.cpp | 10 ++++------ libraries/app/include/graphene/app/application.hpp | 3 +-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/libraries/app/application.cpp b/libraries/app/application.cpp index 9867b1eea5..cefde196eb 100644 --- a/libraries/app/application.cpp +++ b/libraries/app/application.cpp @@ -403,9 +403,8 @@ void application_impl::startup() _force_validate = true; } - // TODO uncomment this when GUI is ready - //if( _options->count("enable-subscribe-to-all") ) - // _app_options.enable_subscribe_to_all = _options->at("enable-subscribe-to-all").as(); + if( _options->count("enable-subscribe-to-all") ) + _app_options.enable_subscribe_to_all = _options->at("enable-subscribe-to-all").as(); if( _active_plugins.find( "market_history" ) != _active_plugins.end() ) _app_options.has_market_history_plugin = true; @@ -938,9 +937,8 @@ void application::set_program_options(boost::program_options::options_descriptio ("api-access", bpo::value(), "JSON file specifying API permissions") ("plugins", bpo::value(), "Space-separated list of plugins to activate") ("io-threads", bpo::value()->implicit_value(0), "Number of IO threads, default to 0 for auto-configuration") - // TODO uncomment this when GUI is ready - //("enable-subscribe-to-all", bpo::value()->implicit_value(false), - // "Whether allow API clients to subscribe to universal object creation and removal events") + ("enable-subscribe-to-all", bpo::value()->implicit_value(false), + "Whether allow API clients to subscribe to universal object creation and removal events") ; command_line_options.add(configuration_file_options); command_line_options.add_options() diff --git a/libraries/app/include/graphene/app/application.hpp b/libraries/app/include/graphene/app/application.hpp index d187682b3a..4892bb9a27 100644 --- a/libraries/app/include/graphene/app/application.hpp +++ b/libraries/app/include/graphene/app/application.hpp @@ -38,8 +38,7 @@ namespace graphene { namespace app { class application_options { public: - // TODO change default to false when GUI is ready - bool enable_subscribe_to_all = true; + bool enable_subscribe_to_all = false; bool has_market_history_plugin = false; }; From bab33483b269da53333eca0d2c1d3b217390f37a Mon Sep 17 00:00:00 2001 From: John Jones Date: Fri, 24 Aug 2018 07:50:10 -0500 Subject: [PATCH 2/6] enable subscribe_to_all by default --- libraries/app/application.cpp | 2 +- libraries/app/include/graphene/app/application.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/app/application.cpp b/libraries/app/application.cpp index 2821780ede..feafafc310 100644 --- a/libraries/app/application.cpp +++ b/libraries/app/application.cpp @@ -942,7 +942,7 @@ void application::set_program_options(boost::program_options::options_descriptio ("api-access", bpo::value(), "JSON file specifying API permissions") ("plugins", bpo::value(), "Space-separated list of plugins to activate") ("io-threads", bpo::value()->implicit_value(0), "Number of IO threads, default to 0 for auto-configuration") - ("enable-subscribe-to-all", bpo::value()->implicit_value(false), + ("enable-subscribe-to-all", bpo::value()->implicit_value(true), "Whether allow API clients to subscribe to universal object creation and removal events") ("enable-standby-votes-tracking", bpo::value()->implicit_value(true), "Whether to enable tracking of votes of standby witnesses and committee members. " diff --git a/libraries/app/include/graphene/app/application.hpp b/libraries/app/include/graphene/app/application.hpp index 4892bb9a27..7583e45c57 100644 --- a/libraries/app/include/graphene/app/application.hpp +++ b/libraries/app/include/graphene/app/application.hpp @@ -38,7 +38,7 @@ namespace graphene { namespace app { class application_options { public: - bool enable_subscribe_to_all = false; + bool enable_subscribe_to_all = true; bool has_market_history_plugin = false; }; From 7b02d9af707725e6dfe12eeb816486bd7ef591dd Mon Sep 17 00:00:00 2001 From: John Jones Date: Sat, 1 Sep 2018 13:14:48 -0500 Subject: [PATCH 3/6] Make default cl param not take boolean --- libraries/app/application.cpp | 7 ++++++- libraries/app/include/graphene/app/application.hpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libraries/app/application.cpp b/libraries/app/application.cpp index feafafc310..6ce1f9a659 100644 --- a/libraries/app/application.cpp +++ b/libraries/app/application.cpp @@ -410,7 +410,12 @@ void application_impl::startup() } if( _options->count("enable-subscribe-to-all") ) - _app_options.enable_subscribe_to_all = _options->at("enable-subscribe-to-all").as(); + _app_options.enable_subscribe_to_all = true; + + if (_app_options.enable_subscribe_to_all) + std::cout << "subscribe_to_all is true\n"; + else + std::cout << "subscribe_to_all is false\n"; if( _active_plugins.find( "market_history" ) != _active_plugins.end() ) _app_options.has_market_history_plugin = true; diff --git a/libraries/app/include/graphene/app/application.hpp b/libraries/app/include/graphene/app/application.hpp index 7583e45c57..4892bb9a27 100644 --- a/libraries/app/include/graphene/app/application.hpp +++ b/libraries/app/include/graphene/app/application.hpp @@ -38,7 +38,7 @@ namespace graphene { namespace app { class application_options { public: - bool enable_subscribe_to_all = true; + bool enable_subscribe_to_all = false; bool has_market_history_plugin = false; }; From 1c3cc77022dbc27109f7a7c69e601c69fc460af4 Mon Sep 17 00:00:00 2001 From: John Jones Date: Sat, 1 Sep 2018 13:15:32 -0500 Subject: [PATCH 4/6] Remove test code --- libraries/app/application.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libraries/app/application.cpp b/libraries/app/application.cpp index 6ce1f9a659..1de6e9773c 100644 --- a/libraries/app/application.cpp +++ b/libraries/app/application.cpp @@ -412,11 +412,6 @@ void application_impl::startup() if( _options->count("enable-subscribe-to-all") ) _app_options.enable_subscribe_to_all = true; - if (_app_options.enable_subscribe_to_all) - std::cout << "subscribe_to_all is true\n"; - else - std::cout << "subscribe_to_all is false\n"; - if( _active_plugins.find( "market_history" ) != _active_plugins.end() ) _app_options.has_market_history_plugin = true; From 5f34955fc93e96d46d168dc13acfedbdd09b6aaf Mon Sep 17 00:00:00 2001 From: John Jones Date: Sat, 1 Sep 2018 15:36:49 -0500 Subject: [PATCH 5/6] Fixed logic error on eval of param --- libraries/app/application.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/app/application.cpp b/libraries/app/application.cpp index 1de6e9773c..19462bbf44 100644 --- a/libraries/app/application.cpp +++ b/libraries/app/application.cpp @@ -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")) + _app_options.enable_subscribe_to_all = _options->at("enable-subscribe-to-all").as(); if( _active_plugins.find( "market_history" ) != _active_plugins.end() ) _app_options.has_market_history_plugin = true; From f7d374790c5c2e10b682c2865b57b05d91fc8777 Mon Sep 17 00:00:00 2001 From: John Jones Date: Sun, 2 Sep 2018 21:48:55 -0500 Subject: [PATCH 6/6] Add white space to keep you-know-who happy --- libraries/app/application.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/app/application.cpp b/libraries/app/application.cpp index 19462bbf44..6cbd489e4b 100644 --- a/libraries/app/application.cpp +++ b/libraries/app/application.cpp @@ -409,8 +409,8 @@ void application_impl::startup() _force_validate = true; } - if (_options->count("enable-subscribe-to-all")) - _app_options.enable_subscribe_to_all = _options->at("enable-subscribe-to-all").as(); + if ( _options->count("enable-subscribe-to-all") ) + _app_options.enable_subscribe_to_all = _options->at( "enable-subscribe-to-all" ).as(); if( _active_plugins.find( "market_history" ) != _active_plugins.end() ) _app_options.has_market_history_plugin = true;