diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 1cd323a46..7713d97bb 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -571,6 +571,7 @@ namespace cryptonote responce.difficulty = m_core.get_blockchain_storage().block_difficulty(height); responce.reward = get_block_reward(blk); responce.tx_count = blk.tx_hashes.size(); + responce.cumulative_difficulty = m_core.get_blockchain_storage().block_cumulative_difficulty(height); return true; } //------------------------------------------------------------------------------------------------------------------------------ diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index f87d84bc8..a71d032c2 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -399,6 +399,7 @@ namespace cryptonote difficulty_type difficulty; uint64_t reward; size_t tx_count; + uint64_t cumulative_difficulty; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(major_version) @@ -413,6 +414,7 @@ namespace cryptonote KV_SERIALIZE(difficulty) KV_SERIALIZE(reward) KV_SERIALIZE(tx_count) + KV_SERIALIZE(cumulative_difficulty) END_KV_SERIALIZE_MAP() };