rpc: get_info - add 'synchronized' field

This commit is contained in:
xiphon 2020-11-19 12:51:31 +00:00
parent ee8d740cba
commit 07b50c42dd
2 changed files with 3 additions and 0 deletions

View file

@ -499,6 +499,7 @@ namespace cryptonote
res.update_available = restricted ? false : m_core.is_update_available(); res.update_available = restricted ? false : m_core.is_update_available();
res.version = restricted ? "" : MONERO_VERSION_FULL; res.version = restricted ? "" : MONERO_VERSION_FULL;
res.busy_syncing = m_p2p.get_payload_object().is_busy_syncing(); res.busy_syncing = m_p2p.get_payload_object().is_busy_syncing();
res.synchronized = check_core_ready();
res.status = CORE_RPC_STATUS_OK; res.status = CORE_RPC_STATUS_OK;
return true; return true;

View file

@ -686,6 +686,7 @@ namespace cryptonote
bool update_available; bool update_available;
bool busy_syncing; bool busy_syncing;
std::string version; std::string version;
bool synchronized;
BEGIN_KV_SERIALIZE_MAP() BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE_PARENT(rpc_access_response_base) KV_SERIALIZE_PARENT(rpc_access_response_base)
@ -726,6 +727,7 @@ namespace cryptonote
KV_SERIALIZE(update_available) KV_SERIALIZE(update_available)
KV_SERIALIZE(busy_syncing) KV_SERIALIZE(busy_syncing)
KV_SERIALIZE(version) KV_SERIALIZE(version)
KV_SERIALIZE(synchronized)
END_KV_SERIALIZE_MAP() END_KV_SERIALIZE_MAP()
}; };
typedef epee::misc_utils::struct_init<response_t> response; typedef epee::misc_utils::struct_init<response_t> response;