mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 11:23:26 +01:00
rpc: add version to get_info
This commit is contained in:
parent
84dd674cd0
commit
517f25efd1
@ -112,6 +112,7 @@ target_link_libraries(rpc
|
||||
common
|
||||
cryptonote_core
|
||||
cryptonote_protocol
|
||||
version
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
PRIVATE
|
||||
@ -121,6 +122,7 @@ target_link_libraries(daemon_messages
|
||||
LINK_PRIVATE
|
||||
cryptonote_core
|
||||
cryptonote_protocol
|
||||
version
|
||||
serialization
|
||||
${EXTRA_LIBRARIES})
|
||||
|
||||
@ -129,6 +131,7 @@ target_link_libraries(daemon_rpc_server
|
||||
rpc
|
||||
cryptonote_core
|
||||
cryptonote_protocol
|
||||
version
|
||||
daemon_messages
|
||||
serialization
|
||||
${Boost_CHRONO_LIBRARY}
|
||||
|
@ -210,6 +210,7 @@ namespace cryptonote
|
||||
}
|
||||
res.database_size = m_core.get_blockchain_storage().get_db().get_database_size();
|
||||
res.update_available = m_core.is_update_available();
|
||||
res.version = m_restricted ? "" : MONERO_VERSION;
|
||||
return true;
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
@ -1609,6 +1610,7 @@ namespace cryptonote
|
||||
}
|
||||
res.database_size = m_core.get_blockchain_storage().get_db().get_database_size();
|
||||
res.update_available = m_core.is_update_available();
|
||||
res.version = m_restricted ? "" : MONERO_VERSION;
|
||||
return true;
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -50,7 +50,7 @@ namespace cryptonote
|
||||
// advance which version they will stop working with
|
||||
// Don't go over 32767 for any of these
|
||||
#define CORE_RPC_VERSION_MAJOR 2
|
||||
#define CORE_RPC_VERSION_MINOR 1
|
||||
#define CORE_RPC_VERSION_MINOR 2
|
||||
#define MAKE_CORE_RPC_VERSION(major,minor) (((major)<<16)|(minor))
|
||||
#define CORE_RPC_VERSION MAKE_CORE_RPC_VERSION(CORE_RPC_VERSION_MAJOR, CORE_RPC_VERSION_MINOR)
|
||||
|
||||
@ -892,6 +892,7 @@ namespace cryptonote
|
||||
bool was_bootstrap_ever_used;
|
||||
uint64_t database_size;
|
||||
bool update_available;
|
||||
std::string version;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(status)
|
||||
@ -926,6 +927,7 @@ namespace cryptonote
|
||||
KV_SERIALIZE(was_bootstrap_ever_used)
|
||||
KV_SERIALIZE(database_size)
|
||||
KV_SERIALIZE(update_available)
|
||||
KV_SERIALIZE(version)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
};
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "cryptonote_basic/cryptonote_format_utils.h"
|
||||
#include "cryptonote_basic/blobdatatype.h"
|
||||
#include "ringct/rctSigs.h"
|
||||
#include "version.h"
|
||||
|
||||
namespace cryptonote
|
||||
{
|
||||
@ -437,6 +438,7 @@ namespace rpc
|
||||
res.info.block_size_limit = res.info.block_weight_limit = m_core.get_blockchain_storage().get_current_cumulative_block_weight_limit();
|
||||
res.info.block_size_median = res.info.block_weight_median = m_core.get_blockchain_storage().get_current_cumulative_block_weight_median();
|
||||
res.info.start_time = (uint64_t)m_core.get_start_time();
|
||||
res.info.version = MONERO_VERSION;
|
||||
|
||||
res.status = Message::STATUS_OK;
|
||||
res.error_details = "";
|
||||
|
@ -191,6 +191,7 @@ namespace rpc
|
||||
uint64_t block_size_median;
|
||||
uint64_t block_weight_median;
|
||||
uint64_t start_time;
|
||||
std::string version;
|
||||
};
|
||||
|
||||
struct output_distribution
|
||||
|
Loading…
Reference in New Issue
Block a user