diff --git a/libraries/app/api.cpp b/libraries/app/api.cpp index f3cffa70ff..fb45123e03 100644 --- a/libraries/app/api.cpp +++ b/libraries/app/api.cpp @@ -352,7 +352,8 @@ namespace graphene { namespace app { { FC_ASSERT( _app.chain_database() ); const auto& db = *_app.chain_database(); - FC_ASSERT( limit <= 100 ); + const uint32_t max_account_history_operations_limit=_app.get_options().max_account_history_operations_limit; + FC_ASSERT(limit <= max_account_history_operations_limit); vector result; account_id_type account; try { diff --git a/libraries/app/application.cpp b/libraries/app/application.cpp index cc7828034f..ffa17aa72a 100644 --- a/libraries/app/application.cpp +++ b/libraries/app/application.cpp @@ -439,6 +439,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(); + if ( _options->count("max-account-history-operations-limit") ) + { + _app_options.max_account_history_operations_limit = _options->at("max-account-history-operations-limit").as(); + } + + if( _active_plugins.find( "market_history" ) != _active_plugins.end() ) _app_options.has_market_history_plugin = true; @@ -982,6 +988,8 @@ void application::set_program_options(boost::program_options::options_descriptio ("enable-standby-votes-tracking", bpo::value()->implicit_value(true), "Whether to enable tracking of votes of standby witnesses and committee members. " "Set it to true to provide accurate data to API clients, set to false for slightly better performance.") + ("max-account-history-operations-limit",boost::program_options::value()->default_value(100), + "For history_api::get_account_history_operations to increase its limited value default is 100") ; 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 4892bb9a27..d301923ae8 100644 --- a/libraries/app/include/graphene/app/application.hpp +++ b/libraries/app/include/graphene/app/application.hpp @@ -40,6 +40,7 @@ namespace graphene { namespace app { public: bool enable_subscribe_to_all = false; bool has_market_history_plugin = false; + uint32_t max_account_history_operations_limit=100; }; class application