Skip to content

Commit

Permalink
rpc: quantize db size up to 5 GB in restricted mode
Browse files Browse the repository at this point in the history
  • Loading branch information
moneromooo-monero committed Mar 17, 2019
1 parent ea07a9b commit a721179
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rpc/core_rpc_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a721179

Please sign in to comment.