Merge pull request #4878
517f25ef
rpc: add version to get_info (Jethro Grassie)
This commit is contained in:
commit
e282e9fa40
@ -112,6 +112,7 @@ target_link_libraries(rpc
|
|||||||
common
|
common
|
||||||
cryptonote_core
|
cryptonote_core
|
||||||
cryptonote_protocol
|
cryptonote_protocol
|
||||||
|
version
|
||||||
${Boost_REGEX_LIBRARY}
|
${Boost_REGEX_LIBRARY}
|
||||||
${Boost_THREAD_LIBRARY}
|
${Boost_THREAD_LIBRARY}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
@ -121,6 +122,7 @@ target_link_libraries(daemon_messages
|
|||||||
LINK_PRIVATE
|
LINK_PRIVATE
|
||||||
cryptonote_core
|
cryptonote_core
|
||||||
cryptonote_protocol
|
cryptonote_protocol
|
||||||
|
version
|
||||||
serialization
|
serialization
|
||||||
${EXTRA_LIBRARIES})
|
${EXTRA_LIBRARIES})
|
||||||
|
|
||||||
@ -129,6 +131,7 @@ target_link_libraries(daemon_rpc_server
|
|||||||
rpc
|
rpc
|
||||||
cryptonote_core
|
cryptonote_core
|
||||||
cryptonote_protocol
|
cryptonote_protocol
|
||||||
|
version
|
||||||
daemon_messages
|
daemon_messages
|
||||||
serialization
|
serialization
|
||||||
${Boost_CHRONO_LIBRARY}
|
${Boost_CHRONO_LIBRARY}
|
||||||
|
@ -211,6 +211,7 @@ namespace cryptonote
|
|||||||
}
|
}
|
||||||
res.database_size = m_core.get_blockchain_storage().get_db().get_database_size();
|
res.database_size = m_core.get_blockchain_storage().get_db().get_database_size();
|
||||||
res.update_available = m_core.is_update_available();
|
res.update_available = m_core.is_update_available();
|
||||||
|
res.version = m_restricted ? "" : MONERO_VERSION;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------------------------------------------
|
||||||
@ -1613,6 +1614,7 @@ namespace cryptonote
|
|||||||
}
|
}
|
||||||
res.database_size = m_core.get_blockchain_storage().get_db().get_database_size();
|
res.database_size = m_core.get_blockchain_storage().get_db().get_database_size();
|
||||||
res.update_available = m_core.is_update_available();
|
res.update_available = m_core.is_update_available();
|
||||||
|
res.version = m_restricted ? "" : MONERO_VERSION;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -928,6 +928,7 @@ namespace cryptonote
|
|||||||
bool was_bootstrap_ever_used;
|
bool was_bootstrap_ever_used;
|
||||||
uint64_t database_size;
|
uint64_t database_size;
|
||||||
bool update_available;
|
bool update_available;
|
||||||
|
std::string version;
|
||||||
|
|
||||||
BEGIN_KV_SERIALIZE_MAP()
|
BEGIN_KV_SERIALIZE_MAP()
|
||||||
KV_SERIALIZE(status)
|
KV_SERIALIZE(status)
|
||||||
@ -962,6 +963,7 @@ namespace cryptonote
|
|||||||
KV_SERIALIZE(was_bootstrap_ever_used)
|
KV_SERIALIZE(was_bootstrap_ever_used)
|
||||||
KV_SERIALIZE(database_size)
|
KV_SERIALIZE(database_size)
|
||||||
KV_SERIALIZE(update_available)
|
KV_SERIALIZE(update_available)
|
||||||
|
KV_SERIALIZE(version)
|
||||||
END_KV_SERIALIZE_MAP()
|
END_KV_SERIALIZE_MAP()
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "cryptonote_basic/cryptonote_format_utils.h"
|
#include "cryptonote_basic/cryptonote_format_utils.h"
|
||||||
#include "cryptonote_basic/blobdatatype.h"
|
#include "cryptonote_basic/blobdatatype.h"
|
||||||
#include "ringct/rctSigs.h"
|
#include "ringct/rctSigs.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
namespace cryptonote
|
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_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.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.start_time = (uint64_t)m_core.get_start_time();
|
||||||
|
res.info.version = MONERO_VERSION;
|
||||||
|
|
||||||
res.status = Message::STATUS_OK;
|
res.status = Message::STATUS_OK;
|
||||||
res.error_details = "";
|
res.error_details = "";
|
||||||
|
@ -191,6 +191,7 @@ namespace rpc
|
|||||||
uint64_t block_size_median;
|
uint64_t block_size_median;
|
||||||
uint64_t block_weight_median;
|
uint64_t block_weight_median;
|
||||||
uint64_t start_time;
|
uint64_t start_time;
|
||||||
|
std::string version;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct output_distribution
|
struct output_distribution
|
||||||
|
Loading…
Reference in New Issue
Block a user