aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-26 00:25:13 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-26 00:25:13 +0000
commit55e5a33d85d7a955a4468778279064b209e36af4 (patch)
treee01c202a40db9fc4946cf27a3aa5169e31e527c5 /src/rpc/core_rpc_server.cpp
parentMerge pull request #501 (diff)
downloadmonero-55e5a33d85d7a955a4468778279064b209e36af4.tar.xz
rpc: pass current block target in rpc
This fixes the hash rate being wrong on testnet after the switch to 2 minute blocks
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 f5e700033..33a54ef38 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();