diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-11-04 15:49:21 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-11-04 15:57:56 +0000 |
commit | 7ba31191f35a3e9826c57360ecd418f5d87878d6 (patch) | |
tree | 0edd924b545c00c0b6e3234bb04ed9420d9286eb /src/daemon/command_parser_executor.cpp | |
parent | Merge pull request #6087 (diff) | |
download | monero-7ba31191f35a3e9826c57360ecd418f5d87878d6.tar.xz |
daemon: add +meta print_tx parameter
prints size, weight and (if mined) height
Diffstat (limited to 'src/daemon/command_parser_executor.cpp')
-rw-r--r-- | src/daemon/command_parser_executor.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index b827221f6..2c472f1c7 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -244,12 +244,15 @@ bool t_command_parser_executor::print_block(const std::vector<std::string>& args bool t_command_parser_executor::print_transaction(const std::vector<std::string>& args) { + bool include_metadata = false; bool include_hex = false; bool include_json = false; // Assumes that optional flags come after mandatory argument <transaction_hash> for (unsigned int i = 1; i < args.size(); ++i) { - if (args[i] == "+hex") + if (args[i] == "+meta") + include_metadata = true; + else if (args[i] == "+hex") include_hex = true; else if (args[i] == "+json") include_json = true; @@ -261,7 +264,7 @@ bool t_command_parser_executor::print_transaction(const std::vector<std::string> } if (args.empty()) { - std::cout << "expected: print_tx <transaction_hash> [+hex] [+json]" << std::endl; + std::cout << "expected: print_tx <transaction_hash> [+meta] [+hex] [+json]" << std::endl; return true; } @@ -269,7 +272,7 @@ bool t_command_parser_executor::print_transaction(const std::vector<std::string> crypto::hash tx_hash; if (parse_hash256(str_hash, tx_hash)) { - m_executor.print_transaction(tx_hash, include_hex, include_json); + m_executor.print_transaction(tx_hash, include_metadata, include_hex, include_json); } return true; |