Skip to content

Commit

Permalink
change major version check
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage authored and abitmore committed Dec 20, 2021
1 parent 6f010d5 commit 8b43b64
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 @@ -560,7 +560,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 @@ -410,7 +410,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 8b43b64

Please sign in to comment.