aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/command_parser_executor.cpp
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-02-06 00:31:17 -0800
committerAlexander Blair <snipa@jagtech.io>2020-02-06 00:31:17 -0800
commitb8e5c769c7ccb4675f84759a83214e2fb52dae54 (patch)
tree9e8cafec224507fbdd654da98bd3c3415fd2852d /src/daemon/command_parser_executor.cpp
parentMerge pull request #6094 (diff)
parentdaemon: add +meta print_tx parameter (diff)
downloadmonero-b8e5c769c7ccb4675f84759a83214e2fb52dae54.tar.xz
Merge pull request #6095
7ba31191 daemon: add +meta print_tx parameter (moneromooo-monero)
Diffstat (limited to 'src/daemon/command_parser_executor.cpp')
-rw-r--r--src/daemon/command_parser_executor.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp
index 99a460c78..c11c7707a 100644
--- a/src/daemon/command_parser_executor.cpp
+++ b/src/daemon/command_parser_executor.cpp
@@ -243,12 +243,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;
@@ -260,7 +263,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;
}
@@ -268,7 +271,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;