Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #5506 from conr2d/cleos
Browse files Browse the repository at this point in the history
Print separators properly with `cleos get account`
  • Loading branch information
heifner authored Sep 4, 2018
2 parents 73cf85f + 1ded5cb commit 9288f2a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions programs/cleos/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1492,14 +1492,14 @@ void get_account( const string& accountName, bool json_format ) {
std::function<void (account_name, int)> dfs_print = [&]( account_name name, int depth ) -> void {
auto& p = cache.at(name);
std::cout << indent << std::string(depth*3, ' ') << name << ' ' << std::setw(5) << p.required_auth.threshold << ": ";
const char *sep = "";
for ( auto it = p.required_auth.keys.begin(); it != p.required_auth.keys.end(); ++it ) {
if ( it != p.required_auth.keys.begin() ) {
std::cout << ", ";
}
std::cout << it->weight << ' ' << string(it->key);
std::cout << sep << it->weight << ' ' << string(it->key);
sep = ", ";
}
for ( auto& acc : p.required_auth.accounts ) {
std::cout << acc.weight << ' ' << string(acc.permission.actor) << '@' << string(acc.permission.permission) << ", ";
std::cout << sep << acc.weight << ' ' << string(acc.permission.actor) << '@' << string(acc.permission.permission);
sep = ", ";
}
std::cout << std::endl;
auto it = tree.find( name );
Expand Down

0 comments on commit 9288f2a

Please sign in to comment.