aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorDion Ahmetaj <Dion Ahmetaj>2016-10-10 19:55:18 -0400
committerDion Ahmetaj <Dion Ahmetaj>2016-10-10 19:55:18 -0400
commit7db29d6903fe24eabaaf3b3afc364b6924d5b463 (patch)
treed754fd808175986db9a77aec743d89b7fced914b /src/rpc
parentchanged params from start/end index to height/count (diff)
downloadmonero-7db29d6903fe24eabaaf3b3afc364b6924d5b463.tar.xz
print_coinbase_tx_sum now breaks output into fee and emission components
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/core_rpc_server.cpp4
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index af36961f2..e8b2d5cb1 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -1268,7 +1268,9 @@ namespace cryptonote
//------------------------------------------------------------------------------------------------------------------------------
bool core_rpc_server::on_get_coinbase_tx_sum(const COMMAND_RPC_GET_COINBASE_TX_SUM::request& req, COMMAND_RPC_GET_COINBASE_TX_SUM::response& res, epee::json_rpc::error& error_resp)
{
- res.amount = m_core.get_coinbase_tx_sum(req.height, req.count);
+ std::pair<uint64_t, uint64_t> amounts = m_core.get_coinbase_tx_sum(req.height, req.count);
+ res.emission_amount = amounts.first;
+ res.fee_amount = amounts.second;
return true;
}
//------------------------------------------------------------------------------------------------------------------------------
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index 47ce37f2f..61c302e45 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -1243,11 +1243,13 @@ namespace cryptonote
struct response
{
std::string status;
- uint64_t amount;
+ uint64_t emission_amount;
+ uint64_t fee_amount;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(status)
- KV_SERIALIZE(amount)
+ KV_SERIALIZE(emission_amount)
+ KV_SERIALIZE(fee_amount)
END_KV_SERIALIZE_MAP()
};
};