aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-04-15 21:58:09 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-06-26 22:14:16 +0100
commit6795bd0d4eb680f378ea779a130cefad618e11d2 (patch)
tree6536c2ee59e8e28f80c3ccb959826705c2b0f905 /src/rpc
parentwallet2: use std::move on containers where appropriate (diff)
downloadmonero-6795bd0d4eb680f378ea779a130cefad618e11d2.tar.xz
rpc: add option to skip coinbase info in get_blocks.bin
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/core_rpc_server.cpp11
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h2
2 files changed, 9 insertions, 4 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index dc7b6b30f..4c14e5c64 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -249,11 +249,14 @@ namespace cryptonote
res.status = "Invalid block";
return false;
}
- bool r = m_core.get_tx_outputs_gindexs(get_transaction_hash(b.miner_tx), res.output_indices.back().indices.back().indices);
- if (!r)
+ if (!req.no_miner_tx)
{
- res.status = "Failed";
- return false;
+ bool r = m_core.get_tx_outputs_gindexs(get_transaction_hash(b.miner_tx), res.output_indices.back().indices.back().indices);
+ if (!r)
+ {
+ res.status = "Failed";
+ return false;
+ }
}
size_t txidx = 0;
ntxes += bd.second.size();
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index 1e624da1b..abebad27b 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -83,10 +83,12 @@ namespace cryptonote
std::list<crypto::hash> block_ids; //*first 10 blocks id goes sequential, next goes in pow(2,n) offset, like 2, 4, 8, 16, 32, 64 and so on, and the last one is always genesis block */
uint64_t start_height;
bool prune;
+ bool no_miner_tx;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE_CONTAINER_POD_AS_BLOB(block_ids)
KV_SERIALIZE(start_height)
KV_SERIALIZE(prune)
+ KV_SERIALIZE_OPT(no_miner_tx, false)
END_KV_SERIALIZE_MAP()
};