aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-11-30 00:16:55 +0200
committerRiccardo Spagni <ric@spagni.net>2015-11-30 00:16:58 +0200
commit83b412f4718506e8c9429b83e3826052a8942f6f (patch)
treefbd3650feaad57ccac30461545224d6affd88bfd /src/rpc/core_rpc_server.cpp
parentMerge pull request #502 (diff)
parentrpc: pass current block target in rpc (diff)
downloadmonero-83b412f4718506e8c9429b83e3826052a8942f6f.tar.xz
Merge pull request #503
55e5a33 rpc: pass current block target in rpc (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 e2b30b6e0..ef129d71c 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -119,6 +119,7 @@ namespace cryptonote
res.height = m_core.get_current_blockchain_height();
res.target_height = m_core.get_target_blockchain_height();
res.difficulty = m_core.get_blockchain_storage().get_difficulty_for_next_block();
+ res.target = m_core.get_blockchain_storage().get_current_hard_fork_version() < 2 ? DIFFICULTY_TARGET_V1 : DIFFICULTY_TARGET;
res.tx_count = m_core.get_blockchain_storage().get_total_transactions() - res.height; //without coinbase
res.tx_pool_size = m_core.get_pool_transactions_count();
res.alt_blocks_count = m_core.get_blockchain_storage().get_alternative_blocks_count();