aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-09-18 13:08:16 +0200
committerRiccardo Spagni <ric@spagni.net>2017-09-18 13:08:16 +0200
commit591e53445b2643af1e9a5266ffa5324cad758255 (patch)
treeb10169969aab78bdf6868f9c48176a8804182ee9 /src/rpc/core_rpc_server.cpp
parent13a263894ae13460803d2f7fb1ec3efadaeb79d1 (diff)
parent0299cb77ca18073daf3cf371f8da013fb596ae48 (diff)
downloadmonzero-core-591e53445b2643af1e9a5266ffa5324cad758255.tar.gz
monzero-core-591e53445b2643af1e9a5266ffa5324cad758255.tar.xz
monzero-core-591e53445b2643af1e9a5266ffa5324cad758255.zip
Merge pull request #2044
0299cb77 Fix various oversights/bugs in ZMQ RPC server code (Thomas Winget) 77986023 json serialization for rpc-relevant monero types (Thomas Winget) 5c1e08fe Refactor some things into more composable (smaller) functions (Thomas Winget) 9ac2ad07 DRY refactoring (Thomas Winget)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index a6a61705b..1f7f4a1ff 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -137,7 +137,7 @@ namespace cryptonote
res.top_block_hash = string_tools::pod_to_hex(top_hash);
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_V2;
+ res.target = m_core.get_blockchain_storage().get_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();