aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/command_parser_executor.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-04-11 00:32:30 +0200
committerRiccardo Spagni <ric@spagni.net>2017-04-11 00:32:30 +0200
commit878c4ee913eb9f3ba7f56e939988b4a34b3c30a0 (patch)
treedfa82e81aa79559181aba2b94fad70d89bb32af7 /src/daemon/command_parser_executor.cpp
parentMerge pull request #1951 (diff)
parentdaemon: new relay_tx command and RPC (diff)
downloadmonero-878c4ee913eb9f3ba7f56e939988b4a34b3c30a0.tar.xz
Merge pull request #1952
548075b1 daemon: new relay_tx command and RPC (moneromooo-monero)
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