Merge pull request #735

d2aa427 rpc: fix print_tx in command line mode (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2016-03-20 21:27:28 +02:00
commit 9b10e9cc75
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
1 changed files with 1 additions and 1 deletions

View File

@ -559,6 +559,7 @@ bool t_rpc_command_executor::print_transaction(crypto::hash transaction_hash) {
std::string fail_message = "Problem fetching transaction"; std::string fail_message = "Problem fetching transaction";
req.txs_hashes.push_back(epee::string_tools::pod_to_hex(transaction_hash));
if (m_is_rpc) if (m_is_rpc)
{ {
if (!m_rpc_client->rpc_request(req, res, "/gettransactions", fail_message.c_str())) if (!m_rpc_client->rpc_request(req, res, "/gettransactions", fail_message.c_str()))
@ -568,7 +569,6 @@ bool t_rpc_command_executor::print_transaction(crypto::hash transaction_hash) {
} }
else else
{ {
req.txs_hashes.push_back(epee::string_tools::pod_to_hex(transaction_hash));
if (!m_rpc_server->on_get_transactions(req, res) || res.status != CORE_RPC_STATUS_OK) if (!m_rpc_server->on_get_transactions(req, res) || res.status != CORE_RPC_STATUS_OK)
{ {
tools::fail_msg_writer() << fail_message.c_str(); tools::fail_msg_writer() << fail_message.c_str();