diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-11-20 14:12:19 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-11-22 20:00:23 +0000 |
commit | e05907b3e7fccf11050797c5dcf8eec81d229abe (patch) | |
tree | 7f0e1a57dc2917a6b9b615c1fe84bec27cf4f720 /src | |
parent | Merge pull request #1346 (diff) | |
download | monero-e05907b3e7fccf11050797c5dcf8eec81d229abe.tar.xz |
rpc: add output indices to gettransactions
Someone apparently needs that to make a wallet but never asked.
If you read that and that's not what you wanted, the bugtracker
is at https://github.com/monero-project/monero/issues
Diffstat (limited to 'src')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 8 | ||||
-rw-r--r-- | src/rpc/core_rpc_server_commands_defs.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index a02a2375b..d9fa0e383 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -388,6 +388,14 @@ namespace cryptonote res.txs_as_hex.push_back(e.as_hex); if (req.decode_as_json) res.txs_as_json.push_back(e.as_json); + + // output indices too + bool r = m_core.get_tx_outputs_gindexs(tx_hash, e.output_indices); + if (!r) + { + res.status = "Failed"; + return false; + } } BOOST_FOREACH(const auto& miss_tx, missed_txs) diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index 6d452f59d..efb95804c 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -162,6 +162,7 @@ namespace cryptonote std::string as_json; bool in_pool; uint64_t block_height; + std::vector<uint64_t> output_indices; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(tx_hash) @@ -169,6 +170,7 @@ namespace cryptonote KV_SERIALIZE(as_json) KV_SERIALIZE(in_pool) KV_SERIALIZE(block_height) + KV_SERIALIZE(output_indices) END_KV_SERIALIZE_MAP() }; |