diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-11-30 15:44:01 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-11-30 15:44:01 +0000 |
commit | abebe392c7bb9fb0ff716c9640cd752e579ba068 (patch) | |
tree | 5dc9c65eaec07de869ef590958ce1d388f0fef9f /src/rpc | |
parent | core: make --offline also disable DNS lookups (diff) | |
download | monero-abebe392c7bb9fb0ff716c9640cd752e579ba068.tar.xz |
rpc: add offline state in info rpc
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 2 | ||||
-rw-r--r-- | src/rpc/core_rpc_server_commands_defs.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index e9a6a18aa..336db9073 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -150,6 +150,7 @@ namespace cryptonote res.status = CORE_RPC_STATUS_OK; res.start_time = (uint64_t)m_core.get_start_time(); res.free_space = m_restricted ? std::numeric_limits<uint64_t>::max() : m_core.get_free_space(); + res.offline = m_core.offline(); return true; } //------------------------------------------------------------------------------------------------------------------------------ @@ -1330,6 +1331,7 @@ namespace cryptonote res.status = CORE_RPC_STATUS_OK; res.start_time = (uint64_t)m_core.get_start_time(); res.free_space = m_restricted ? std::numeric_limits<uint64_t>::max() : m_core.get_free_space(); + res.offline = m_core.offline(); return true; } //------------------------------------------------------------------------------------------------------------------------------ diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index d27d5611e..0746def78 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -49,7 +49,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 1 -#define CORE_RPC_VERSION_MINOR 16 +#define CORE_RPC_VERSION_MINOR 17 #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) @@ -928,6 +928,7 @@ namespace cryptonote uint64_t block_size_limit; uint64_t start_time; uint64_t free_space; + bool offline; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(status) @@ -949,6 +950,7 @@ namespace cryptonote KV_SERIALIZE(block_size_limit) KV_SERIALIZE(start_time) KV_SERIALIZE(free_space) + KV_SERIALIZE(offline) END_KV_SERIALIZE_MAP() }; }; |