Skip to content

Commit

Permalink
remove not needed check
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Nov 18, 2018
1 parent ce35a79 commit 58ad814
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions programs/witness_node/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,19 @@ int main(int argc, char** argv) {
return 1;
}

if (options.count("plugins")) {
std::set<std::string> plugins;
boost::split(plugins, options.at("plugins").as<std::string>(), [](char c){return c == ' ';});

std::set<std::string> plugins;
boost::split(plugins, options.at("plugins").as<std::string>(), [](char c){return c == ' ';});
if(plugins.count("account_history") && plugins.count("elasticsearch")) {
std::cerr << "Plugin conflict: Cannot load both account_history plugin and elasticsearch plugin\n";
return 1;
}

if(plugins.count("account_history") && plugins.count("elasticsearch")) {
std::cerr << "Plugin conflict: Cannot load both account_history plugin and elasticsearch plugin\n";
return 1;
std::for_each(plugins.begin(), plugins.end(), [node](const std::string& plug) mutable {
if (!plug.empty()) {
node->enable_plugin(plug);
}

std::for_each(plugins.begin(), plugins.end(), [node](const std::string& plug) mutable {
if (!plug.empty()) {
node->enable_plugin(plug);
}
});
}
});

if( options.count("help") )
{
Expand Down

0 comments on commit 58ad814

Please sign in to comment.