mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Improve readability of validator-engine-console commands (#1426)
1. Add dashes to command names (old names still work for compatibility) 2. Better shard format 3. Allow base64 in some parameters
This commit is contained in:
parent
540d1fb4b7
commit
ce58805104
5 changed files with 193 additions and 155 deletions
|
@ -206,9 +206,8 @@ void ValidatorEngineConsole::show_help(std::string command, td::Promise<td::Buff
|
|||
td::TerminalIO::out() << cmd.second->help() << "\n";
|
||||
}
|
||||
} else {
|
||||
auto it = query_runners_.find(command);
|
||||
if (it != query_runners_.end()) {
|
||||
td::TerminalIO::out() << it->second->help() << "\n";
|
||||
if (auto query = get_query(command)) {
|
||||
td::TerminalIO::out() << query->help() << "\n";
|
||||
} else {
|
||||
td::TerminalIO::out() << "unknown command '" << command << "'\n";
|
||||
}
|
||||
|
@ -232,10 +231,9 @@ void ValidatorEngineConsole::parse_line(td::BufferSlice data) {
|
|||
}
|
||||
auto name = tokenizer.get_token<std::string>().move_as_ok();
|
||||
|
||||
auto it = query_runners_.find(name);
|
||||
if (it != query_runners_.end()) {
|
||||
if (auto query = get_query(name)) {
|
||||
running_queries_++;
|
||||
it->second->run(actor_id(this), std::move(tokenizer));
|
||||
query->run(actor_id(this), std::move(tokenizer));
|
||||
} else {
|
||||
td::TerminalIO::out() << "unknown command '" << name << "'\n";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue