Skip to content

Commit

Permalink
change major version check
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Sep 20, 2019
1 parent d623471 commit ae067f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion libraries/plugins/elasticsearch/elasticsearch_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,8 @@ void elasticsearch_plugin::plugin_startup()
FC_THROW_EXCEPTION(fc::exception, "ES database is not up in url ${url}", ("url", my->_elasticsearch_node_url));

const auto es_version = graphene::utilities::getVersion(es);
if(std::stoi(es_version.substr(0,1)) >= 7)
auto dot_pos = es_version.find('.');
if(std::stoi(es_version.substr(0,dot_pos)) >= 7)
my->esge7 = true;

ilog("elasticsearch ACCOUNT HISTORY: plugin_startup() begin");
Expand Down
3 changes: 2 additions & 1 deletion libraries/plugins/es_objects/es_objects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ void es_objects_plugin::plugin_startup()
ilog("elasticsearch OBJECTS: plugin_startup() begin");

const auto es_version = graphene::utilities::getVersion(es);
if(std::stoi(es_version.substr(0,1)) >= 7)
auto dot_pos = es_version.find('.');
if(std::stoi(es_version.substr(0,dot_pos)) >= 7)
my->esge7 = true;
}

Expand Down

0 comments on commit ae067f0

Please sign in to comment.