Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code clean up #33417

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions accounts-db/src/accounts_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ impl<'a> AccountsHasher<'a> {

// This function is designed to allow hashes to be located in multiple, perhaps multiply deep vecs.
// The caller provides a function to return a slice from the source data.
pub fn compute_merkle_root_from_slices<'b, F, T>(
fn compute_merkle_root_from_slices<'b, F, T>(
total_hashes: usize,
fanout: usize,
max_levels_per_pass: Option<usize>,
Expand Down Expand Up @@ -706,7 +706,7 @@ impl<'a> AccountsHasher<'a> {
}
}

pub fn compute_merkle_root_from_slices_recurse(
fn compute_merkle_root_from_slices_recurse(
hashes: Vec<Hash>,
fanout: usize,
max_levels_per_pass: Option<usize>,
Expand Down
3 changes: 1 addition & 2 deletions bucket_map/src/bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,9 @@ impl<'b, T: Clone + Copy + PartialEq + std::fmt::Debug + 'static> Bucket<T> {
// pop one entry at a time to insert in the first free location we find
'outer: while let Some((ix_entry_raw, i)) = reverse_sorted_entries.pop() {
let (k, v) = &items[i];
let ix_entry = ix_entry_raw % cap;
// search for an empty spot starting at `ix_entry`
for search in 0..search_end {
let ix_index = (ix_entry + search) % cap;
let ix_index = (ix_entry_raw + search) % cap;
let elem = IndexEntryPlaceInBucket::new(ix_index);
if index.try_lock(ix_index) {
*entries_created_on_disk += 1;
Expand Down