Skip to content

Commit

Permalink
Update blockchain.cpp (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex v committed Jun 4, 2020
1 parent eccce9e commit 4169273
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/rpc/blockchain.cpp
Expand Up @@ -1039,38 +1039,37 @@ UniValue listconsultations(const UniValue& params, bool fHelp)
bool showReflection = false;
bool showVoting = false;
bool showFinished = false;
bool showAll = params.size() == 0;
bool showAll = true;

if(params.size() >= 1)
{
showNotEnoughAnswers = false;
showLookingForSupport = false;
showReflection = false;
showVoting = false;
showFinished = false;

for(unsigned int i = 0; i < params.size(); i++)
{
auto p = params[i];
if (p.get_str() == "not_enough_answers")
{
showNotEnoughAnswers = true;
showAll = false;
}
else if (p.get_str() == "waiting_for_support")
{
showLookingForSupport = true;
showAll = false;
}
else if (p.get_str() == "reflection")
{
showReflection = true;
showAll = false;
}
else if (p.get_str() == "voting")
{
showVoting = true;
showAll = false;
}
else if (p.get_str() == "finished")
{
showFinished = true;
showAll = false;
}
}
}
Expand Down

0 comments on commit 4169273

Please sign in to comment.