rpc: add explicit restricted flag to /get_info
This commit is contained in:
parent
9aab19f349
commit
5e201fedc5
|
@ -534,6 +534,7 @@ namespace cryptonote
|
||||||
res.version = restricted ? "" : MONERO_VERSION_FULL;
|
res.version = restricted ? "" : MONERO_VERSION_FULL;
|
||||||
res.synchronized = check_core_ready();
|
res.synchronized = check_core_ready();
|
||||||
res.busy_syncing = m_p2p.get_payload_object().is_busy_syncing();
|
res.busy_syncing = m_p2p.get_payload_object().is_busy_syncing();
|
||||||
|
res.restricted = restricted;
|
||||||
|
|
||||||
res.status = CORE_RPC_STATUS_OK;
|
res.status = CORE_RPC_STATUS_OK;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace cryptonote
|
||||||
// advance which version they will stop working with
|
// advance which version they will stop working with
|
||||||
// Don't go over 32767 for any of these
|
// Don't go over 32767 for any of these
|
||||||
#define CORE_RPC_VERSION_MAJOR 3
|
#define CORE_RPC_VERSION_MAJOR 3
|
||||||
#define CORE_RPC_VERSION_MINOR 9
|
#define CORE_RPC_VERSION_MINOR 10
|
||||||
#define MAKE_CORE_RPC_VERSION(major,minor) (((major)<<16)|(minor))
|
#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)
|
#define CORE_RPC_VERSION MAKE_CORE_RPC_VERSION(CORE_RPC_VERSION_MAJOR, CORE_RPC_VERSION_MINOR)
|
||||||
|
|
||||||
|
@ -689,6 +689,7 @@ namespace cryptonote
|
||||||
bool busy_syncing;
|
bool busy_syncing;
|
||||||
std::string version;
|
std::string version;
|
||||||
bool synchronized;
|
bool synchronized;
|
||||||
|
bool restricted;
|
||||||
|
|
||||||
BEGIN_KV_SERIALIZE_MAP()
|
BEGIN_KV_SERIALIZE_MAP()
|
||||||
KV_SERIALIZE_PARENT(rpc_access_response_base)
|
KV_SERIALIZE_PARENT(rpc_access_response_base)
|
||||||
|
@ -730,6 +731,7 @@ namespace cryptonote
|
||||||
KV_SERIALIZE(busy_syncing)
|
KV_SERIALIZE(busy_syncing)
|
||||||
KV_SERIALIZE(version)
|
KV_SERIALIZE(version)
|
||||||
KV_SERIALIZE(synchronized)
|
KV_SERIALIZE(synchronized)
|
||||||
|
KV_SERIALIZE(restricted)
|
||||||
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;
|
||||||
|
|
Loading…
Reference in New Issue