aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-01-11 22:52:01 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-01-11 22:52:01 +0000
commit664dc42e18539d1222eb5007c1e0a74c84df20ef (patch)
tree86315a3518af854f2f14d4127750eaf8156f695f /src/rpc/core_rpc_server.cpp
parentdaemon: fix status command when run from command line (diff)
downloadmonero-664dc42e18539d1222eb5007c1e0a74c84df20ef.tar.xz
rpc: fix missing target information in RPC call
which fixes the status command via RPC too. Turns out there are two versions of the GET_INFO call. I'd never noticed before.
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 021c12d6e..0f9e2b3ab 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -902,6 +902,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();
@@ -910,6 +911,7 @@ namespace cryptonote
res.incoming_connections_count = total_conn - res.outgoing_connections_count;
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.status = CORE_RPC_STATUS_OK;
return true;
}