Skip to content

Commit

Permalink
Merge branch 'split_files' of github.com:cheme/parity-db into split_f…
Browse files Browse the repository at this point in the history
…iles
  • Loading branch information
cheme committed May 2, 2024
2 parents 42bb723 + 75080c0 commit e286952
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ref_count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fn total_chunks(index_bits: u8) -> u64 {

fn file_size(index_bits: u8, max_chunks: Option<u64>) -> u64 {
let max_size = max_chunks.map(|c| c * CHUNK_LEN as u64);
let total = total_entries(index_bits) * 8 + META_SIZE as u64;
let total = total_entries(index_bits) * ENTRY_BYTES as u64 + META_SIZE as u64;
max_size.map(|m| std::cmp::min(m, total)).unwrap_or(total)
}

Expand Down

0 comments on commit e286952

Please sign in to comment.