aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-11-25 19:48:33 +0200
committerRiccardo Spagni <ric@spagni.net>2017-11-25 19:48:33 +0200
commited2fc4a1ffaf2af5d96545332db367e7033e8c1a (patch)
tree2d86cb3921ac2b15dc239b9a7c66e4c7d88ce20e /src/rpc/core_rpc_server.cpp
parentMerge pull request #2793 (diff)
parentcore: warn when free disk space is low (diff)
downloadmonero-ed2fc4a1ffaf2af5d96545332db367e7033e8c1a.tar.xz
Merge pull request #2794
43f27c7d core: warn when free disk space is low (moneromooo-monero)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 6e7fb7e8e..e9a6a18aa 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -149,6 +149,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;
}
//------------------------------------------------------------------------------------------------------------------------------
@@ -1328,6 +1329,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;
}
//------------------------------------------------------------------------------------------------------------------------------