diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-11-11 23:25:12 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-11-14 10:21:34 +0000 |
commit | 43f27c7d43ee5cae601e1fb0181cba2ccfd7baa6 (patch) | |
tree | 32dad0f3184cb3124810d00a1c183db4633c3dc8 /src/rpc/core_rpc_server.cpp | |
parent | Merge pull request #2694 (diff) | |
download | monero-43f27c7d43ee5cae601e1fb0181cba2ccfd7baa6.tar.xz |
core: warn when free disk space is low
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rwxr-xr-x | src/rpc/core_rpc_server.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index b3ce30d0c..8148d196a 100755 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -157,6 +157,7 @@ namespace cryptonote res.block_size_limit = m_core.get_blockchain_storage().get_current_cumulative_blocksize_limit(); 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(); return true; } //------------------------------------------------------------------------------------------------------------------------------ @@ -1335,6 +1336,7 @@ namespace cryptonote res.block_size_limit = m_core.get_blockchain_storage().get_current_cumulative_blocksize_limit(); 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(); return true; } //------------------------------------------------------------------------------------------------------------------------------ |