diff options
author | luigi1111 <luigi1111w@gmail.com> | 2021-01-15 23:43:46 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2021-01-15 23:43:46 -0500 |
commit | 5c497ed22f9e213335cffa083d6dc15b8b4f9f6a (patch) | |
tree | 3f85084fb24bb1274f2a80ed113eb6ea846d4dc1 | |
parent | Merge pull request #6989 (diff) | |
parent | rpc: report target height as 0 when synced (diff) | |
download | monero-5c497ed22f9e213335cffa083d6dc15b8b4f9f6a.tar.xz |
Merge pull request #7112
47590fc rpc: report target height as 0 when synced (moneromooo-monero)
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 5b2043de6..db228dd94 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -452,7 +452,7 @@ namespace cryptonote m_core.get_blockchain_top(res.height, top_hash); ++res.height; // turn top block height into blockchain height res.top_block_hash = string_tools::pod_to_hex(top_hash); - res.target_height = m_core.get_target_blockchain_height(); + res.target_height = m_p2p.get_payload_object().is_synchronized() ? 0 : m_core.get_target_blockchain_height(); store_difficulty(m_core.get_blockchain_storage().get_difficulty_for_next_block(), res.difficulty, res.wide_difficulty, res.difficulty_top64); 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 @@ -2913,7 +2913,7 @@ namespace cryptonote crypto::hash top_hash; m_core.get_blockchain_top(res.height, top_hash); ++res.height; // turn top block height into blockchain height - res.target_height = m_core.get_target_blockchain_height(); + res.target_height = m_p2p.get_payload_object().is_synchronized() ? 0 : m_core.get_target_blockchain_height(); res.next_needed_pruning_seed = m_p2p.get_payload_object().get_next_needed_pruning_stripe().second; for (const auto &c: m_p2p.get_payload_object().get_connections()) |