mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-21 10:14:30 +00:00
Update binaries/cuprated/src/rpc/handlers/json_rpc.rs
Co-authored-by: Boog900 <boog900@tutanota.com>
This commit is contained in:
parent
13f5ed9dd0
commit
bc6fc0ae13
1 changed files with 1 additions and 5 deletions
|
@ -493,11 +493,7 @@ async fn get_info(
|
||||||
let (database_size, free_space) = blockchain::database_size(&mut state.blockchain_read).await?;
|
let (database_size, free_space) = blockchain::database_size(&mut state.blockchain_read).await?;
|
||||||
let (database_size, free_space) = if restricted {
|
let (database_size, free_space) = if restricted {
|
||||||
// <https://github.com/monero-project/monero/blob/cc73fe71162d564ffda8e549b79a350bca53c454/src/rpc/core_rpc_server.cpp#L131-L134>
|
// <https://github.com/monero-project/monero/blob/cc73fe71162d564ffda8e549b79a350bca53c454/src/rpc/core_rpc_server.cpp#L131-L134>
|
||||||
const fn round_up(value: u64, quantum: u64) -> u64 {
|
let database_size = database_size.div_ceil(5 * 1024 * 1024 * 1024);
|
||||||
value.div_ceil(quantum)
|
|
||||||
}
|
|
||||||
|
|
||||||
let database_size = round_up(database_size, 5 * 1024 * 1024 * 1024);
|
|
||||||
(database_size, u64::MAX)
|
(database_size, u64::MAX)
|
||||||
} else {
|
} else {
|
||||||
(database_size, free_space)
|
(database_size, free_space)
|
||||||
|
|
Loading…
Reference in a new issue