mirror of
https://github.com/monero-project/monero.git
synced 2025-12-16 08:03:58 -05:00
daemon: new relay_tx command and RPC
This commit is contained in:
parent
c9063c0b8f
commit
548075b1f5
8 changed files with 122 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue