aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/command_parser_executor.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-04-02 12:17:35 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-04-02 12:17:35 +0100
commit548075b1f533cd68f4daad63e7688414718f6021 (patch)
tree6927b6a67fa5ad36d14805c3d1c015ef5f8a0b23 /src/daemon/command_parser_executor.cpp
parentMerge pull request #1930 (diff)
downloadmonero-548075b1f533cd68f4daad63e7688414718f6021.tar.xz
daemon: new relay_tx command and RPC
Diffstat (limited to 'src/daemon/command_parser_executor.cpp')
-rw-r--r--src/daemon/command_parser_executor.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp
index 4e6e83eb5..a7caeeffc 100644
--- a/src/daemon/command_parser_executor.cpp
+++ b/src/daemon/command_parser_executor.cpp
@@ -563,4 +563,19 @@ bool t_command_parser_executor::update(const std::vector<std::string>& args)
return m_executor.update(args.front());
}
+bool t_command_parser_executor::relay_tx(const std::vector<std::string>& args)
+{
+ if (args.size() != 1) return false;
+
+ std::string txid;
+ crypto::hash hash;
+ if (!parse_hash256(args[0], hash))
+ {
+ std::cout << "failed to parse tx id" << std::endl;
+ return true;
+ }
+ txid = args[0];
+ return m_executor.relay_tx(txid);
+}
+
} // namespace daemonize