aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-09-21 20:40:22 +0200
committerRiccardo Spagni <ric@spagni.net>2018-09-21 20:40:23 +0200
commit629db71593a5f84944dc5ccf63a943b099ee4b04 (patch)
tree2bf8388ee50409fa8179a51e1e2c1a86e6f76db5 /src/rpc/core_rpc_server.cpp
parentMerge pull request #4371 (diff)
parentrpc: add cumulative difficulty in block header data (diff)
downloadmonero-629db71593a5f84944dc5ccf63a943b099ee4b04.tar.xz
Merge pull request #4373
4f81cd3a rpc: add cumulative difficulty in block header data (moneromooo-monero)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index a85b94541..0443f696e 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -1247,6 +1247,7 @@ namespace cryptonote
response.depth = m_core.get_current_blockchain_height() - height - 1;
response.hash = string_tools::pod_to_hex(hash);
response.difficulty = m_core.get_blockchain_storage().block_difficulty(height);
+ response.cumulative_difficulty = response.block_weight = m_core.get_blockchain_storage().get_db().get_block_cumulative_difficulty(height);
response.reward = get_block_reward(blk);
response.block_size = response.block_weight = m_core.get_blockchain_storage().get_db().get_block_weight(height);
response.num_txes = blk.tx_hashes.size();