aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-12-26 13:58:19 -0800
committerAlexander Blair <snipa@jagtech.io>2020-12-26 13:58:19 -0800
commit355be543c7f9f9505fe2ec4a3c5f3a8521fc1ee3 (patch)
tree5c8d9496f8dedcef083601e576af0220d9d403ab
parentMerge pull request #7155 (diff)
parentrpc: get_info - add 'synchronized' field (diff)
downloadmonero-355be543c7f9f9505fe2ec4a3c5f3a8521fc1ee3.tar.xz
Merge pull request #7161
07b50c42d rpc: get_info - add 'synchronized' field (xiphon)
-rw-r--r--src/rpc/core_rpc_server.cpp1
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index e6ad93312..6252abccf 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -499,6 +499,7 @@ namespace cryptonote
res.update_available = restricted ? false : m_core.is_update_available();
res.version = restricted ? "" : MONERO_VERSION_FULL;
res.busy_syncing = m_p2p.get_payload_object().is_busy_syncing();
+ res.synchronized = check_core_ready();
res.status = CORE_RPC_STATUS_OK;
return true;
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index 21e981eae..bb9005a5f 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -686,6 +686,7 @@ namespace cryptonote
bool update_available;
bool busy_syncing;
std::string version;
+ bool synchronized;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE_PARENT(rpc_access_response_base)
@@ -726,6 +727,7 @@ namespace cryptonote
KV_SERIALIZE(update_available)
KV_SERIALIZE(busy_syncing)
KV_SERIALIZE(version)
+ KV_SERIALIZE(synchronized)
END_KV_SERIALIZE_MAP()
};
typedef epee::misc_utils::struct_init<response_t> response;