diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-02-21 12:55:55 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-03-17 21:27:52 +0000 |
commit | a7211793ba8aeab3edbdb3982c79c169c4c38078 (patch) | |
tree | 28f6272cf3b60cedcbd80312e8ad7ff0400ceb5c /src/rpc | |
parent | Merge pull request #5191 (diff) | |
download | monero-a7211793ba8aeab3edbdb3982c79c169c4c38078.tar.xz |
rpc: quantize db size up to 5 GB in restricted mode
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index ff55167fe..8c6ea7cd1 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -1736,7 +1736,9 @@ namespace cryptonote boost::shared_lock<boost::shared_mutex> lock(m_bootstrap_daemon_mutex); res.was_bootstrap_ever_used = m_was_bootstrap_ever_used; } - res.database_size = restricted ? 0 : m_core.get_blockchain_storage().get_db().get_database_size(); + res.database_size = m_core.get_blockchain_storage().get_db().get_database_size(); + if (restricted) + res.database_size = round_up(res.database_size, 5ull * 1024 * 1024 * 1024); res.update_available = restricted ? false : m_core.is_update_available(); res.version = restricted ? "" : MONERO_VERSION; return true; |