mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-23 08:58:52 +00:00
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.
This commit is contained in:
parent
eaf4dcd747
commit
664dc42e18
@ -902,6 +902,7 @@ namespace cryptonote
|
|||||||
res.height = m_core.get_current_blockchain_height();
|
res.height = m_core.get_current_blockchain_height();
|
||||||
res.target_height = m_core.get_target_blockchain_height();
|
res.target_height = m_core.get_target_blockchain_height();
|
||||||
res.difficulty = m_core.get_blockchain_storage().get_difficulty_for_next_block();
|
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_count = m_core.get_blockchain_storage().get_total_transactions() - res.height; //without coinbase
|
||||||
res.tx_pool_size = m_core.get_pool_transactions_count();
|
res.tx_pool_size = m_core.get_pool_transactions_count();
|
||||||
res.alt_blocks_count = m_core.get_blockchain_storage().get_alternative_blocks_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.incoming_connections_count = total_conn - res.outgoing_connections_count;
|
||||||
res.white_peerlist_size = m_p2p.get_peerlist_manager().get_white_peers_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.grey_peerlist_size = m_p2p.get_peerlist_manager().get_gray_peers_count();
|
||||||
|
res.testnet = m_testnet;
|
||||||
res.status = CORE_RPC_STATUS_OK;
|
res.status = CORE_RPC_STATUS_OK;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -295,6 +295,7 @@ namespace cryptonote
|
|||||||
KV_SERIALIZE(height)
|
KV_SERIALIZE(height)
|
||||||
KV_SERIALIZE(target_height)
|
KV_SERIALIZE(target_height)
|
||||||
KV_SERIALIZE(difficulty)
|
KV_SERIALIZE(difficulty)
|
||||||
|
KV_SERIALIZE(target)
|
||||||
KV_SERIALIZE(tx_count)
|
KV_SERIALIZE(tx_count)
|
||||||
KV_SERIALIZE(tx_pool_size)
|
KV_SERIALIZE(tx_pool_size)
|
||||||
KV_SERIALIZE(alt_blocks_count)
|
KV_SERIALIZE(alt_blocks_count)
|
||||||
|
Loading…
Reference in New Issue
Block a user