diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-10-22 22:14:35 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-10-22 22:14:35 +0200 |
commit | b9f31bbc10dcd48a724f2c6d5e0f31c7267cbb90 (patch) | |
tree | df9a14cfc8fef3219e1db14eac0c45897cab880c /src/rpc/core_rpc_server.cpp | |
parent | Merge pull request #1221 (diff) | |
parent | rpc: add blockchain cumulative difficulty to getinfo call (diff) | |
download | monero-b9f31bbc10dcd48a724f2c6d5e0f31c7267cbb90.tar.xz |
Merge pull request #1222
5e10fb0 rpc: add blockchain cumulative difficulty to getinfo call (moneromooo-monero)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index ffc7fc4e8..0fca2eb57 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -142,6 +142,7 @@ namespace cryptonote res.white_peerlist_size = m_p2p.get_peerlist_manager().get_white_peers_count(); res.grey_peerlist_size = m_p2p.get_peerlist_manager().get_gray_peers_count(); res.testnet = m_testnet; + res.cumulative_difficulty = m_core.get_blockchain_storage().get_db().get_block_cumulative_difficulty(res.height - 1); res.status = CORE_RPC_STATUS_OK; return true; } @@ -1112,6 +1113,7 @@ namespace cryptonote res.white_peerlist_size = m_p2p.get_peerlist_manager().get_white_peers_count(); res.grey_peerlist_size = m_p2p.get_peerlist_manager().get_gray_peers_count(); res.testnet = m_testnet; + res.cumulative_difficulty = m_core.get_blockchain_storage().get_db().get_block_cumulative_difficulty(res.height - 1); res.status = CORE_RPC_STATUS_OK; return true; } |