aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-04-01 17:27:55 +0200
committerRiccardo Spagni <ric@spagni.net>2019-04-01 17:27:56 +0200
commit97831e5f8b55d21e4014f176cb21a5a2471bd4a9 (patch)
tree53a4d391b851b6e70ea205cfe549768dbb298018 /src
parentMerge pull request #5307 (diff)
parentrpc: quantize db size up to 5 GB in restricted mode (diff)
downloadmonero-97831e5f8b55d21e4014f176cb21a5a2471bd4a9.tar.xz
Merge pull request #5308
a7211793 rpc: quantize db size up to 5 GB in restricted mode (moneromooo-monero)
Diffstat (limited to '')
-rw-r--r--src/rpc/core_rpc_server.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index c5557b2e3..e6a09606b 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -1755,7 +1755,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;