diff options
| author | Riccardo Spagni <ric@spagni.net> | 2016-04-14 16:19:49 +0900 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2016-04-14 16:19:49 +0900 |
| commit | 8f63e89c7fce6cf75f41ab8dfd911a144d75b916 (patch) | |
| tree | 70b6639406acbf53a54ea6ffa9e232119078fddb /src/simplewallet/simplewallet.cpp | |
| parent | 977ec85c5de53ac5ff59afc2bb94172318d47790 (diff) | |
| parent | f17b2f42b28844657624e8ea41172b34f17fb2e3 (diff) | |
| download | monzero-core-8f63e89c7fce6cf75f41ab8dfd911a144d75b916.tar.gz monzero-core-8f63e89c7fce6cf75f41ab8dfd911a144d75b916.tar.xz monzero-core-8f63e89c7fce6cf75f41ab8dfd911a144d75b916.zip | |
Merge pull request #791
f17b2f4 rpc: add pool/blockchain and block height results to gettransactions (moneromooo-monero)
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
| -rw-r--r-- | src/simplewallet/simplewallet.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index aa571755f..30c958381 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -2497,13 +2497,18 @@ bool simple_wallet::check_tx_key(const std::vector<std::string> &args_) COMMAND_RPC_GET_TRANSACTIONS::response res; req.txs_hashes.push_back(epee::string_tools::pod_to_hex(txid)); if (!net_utils::invoke_http_json_remote_command2(m_daemon_address + "/gettransactions", req, res, m_http_client) || - res.txs_as_hex.empty()) + (res.txs.empty() && res.txs_as_hex.empty())) { fail_msg_writer() << tr("failed to get transaction from daemon"); return true; } cryptonote::blobdata tx_data; - if (!string_tools::parse_hexstr_to_binbuff(res.txs_as_hex.front(), tx_data)) + bool ok; + if (!res.txs.empty()) + ok = string_tools::parse_hexstr_to_binbuff(res.txs.front().as_hex, tx_data); + else + ok = string_tools::parse_hexstr_to_binbuff(res.txs_as_hex.front(), tx_data); + if (!ok) { fail_msg_writer() << tr("failed to parse transaction from daemon"); return true; |
