diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-09-13 12:41:36 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-09-13 12:41:59 +0000 |
commit | 4f81cd3a3ce75a3a125ae7cb99b17683fd7e809f (patch) | |
tree | 44a41f9ee487bb91bc1b5dcfd09efdae2ae77582 /src/rpc/core_rpc_server.cpp | |
parent | Merge pull request #4219 (diff) | |
download | monero-4f81cd3a3ce75a3a125ae7cb99b17683fd7e809f.tar.xz |
rpc: add cumulative difficulty in block header data
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 4383ad190..0e0f8d9fb 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -1312,6 +1312,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(); |