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

fix: impl suggestions #1064

Merged
merged 3 commits into from
Aug 9, 2024
Merged

fix: impl suggestions #1064

merged 3 commits into from
Aug 9, 2024

Conversation

ananas-block
Copy link
Contributor

  1. HashSet::find_element_index function, the probe index iteration can be limited to 0..20 similar to insertion, avoiding iteration up to capacity. Use a constant instead of the hardcoded value 20.
  2. In HashSet::find_element_iter function, it would be better to iterate from start_iter to (start_iter + num_iterations) as per the parameter name.
  3. In IndexedMerkleTree::add_highest_element function, simplify indexed_array.append(&init_value) with indexed_array.init().
  4. In IndexedArray::hash_element, simplify hashing by using element.hash(next_element.value).
  5. In ConcurrentMerkleTree::append_batch, use self.next_index instead of first_leaf_index + leaf_i.

@vadorovsky vadorovsky merged commit 0ccb5b0 into main Aug 9, 2024
13 checks passed
@vadorovsky vadorovsky deleted the jorrit/chore-impl-suggestions branch August 9, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants