diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-11-23 18:55:32 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-11-23 18:56:54 +0000 |
commit | 1d9e22394458669e5495c9a44ae800bcc37d2a6b (patch) | |
tree | a8470d8a47bd89834cadeb38df2ae2b02edc7354 /src/rpc | |
parent | rpc: bump version after RPC changes (diff) | |
download | monero-1d9e22394458669e5495c9a44ae800bcc37d2a6b.tar.xz |
rpc: do not include output indices for pool txes
Those aren't yet in the blockchain, so will not be found
(and aren't yet known, since it depends on where exactly the
tx will be mined in the next block or blocks)
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index f31732f49..5bf500733 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -425,12 +425,15 @@ namespace cryptonote 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) + // output indices too if not in pool + if (pool_tx_hashes.find(tx_hash) == pool_tx_hashes.end()) { - res.status = "Failed"; - return false; + bool r = m_core.get_tx_outputs_gindexs(tx_hash, e.output_indices); + if (!r) + { + res.status = "Failed"; + return false; + } } } |