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

audit: remove binary search in whitelist strategy #200

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

pscott
Copy link
Collaborator

@pscott pscott commented Jun 13, 2023

Remove the binary search in the whitelist strategy.
Replaces it with an index, provided in userParams.
If voterIndex and voter do not match, VoterAndIndexMismatch is thrown.

Closes #190

@pscott pscott requested a review from Orland0x June 13, 2023 13:10
@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Merging #200 (ffd4189) into main (75241c6) will decrease coverage by 0.16%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #200      +/-   ##
==========================================
- Coverage   83.18%   83.03%   -0.16%     
==========================================
  Files          29       29              
  Lines         452      442      -10     
  Branches      114      113       -1     
==========================================
- Hits          376      367       -9     
  Misses         58       58              
+ Partials       18       17       -1     
Impacted Files Coverage Δ
src/voting-strategies/WhitelistVotingStrategy.sol 100.00% <100.00%> (+7.14%) ⬆️

@Orland0x
Copy link
Contributor

uTACK

@pscott pscott merged commit c73eb71 into main Jun 14, 2023
@Orland0x Orland0x deleted the audit_unnecessary_binary_search branch October 11, 2023 10:37
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.

audit: Unnecessary Binary Search
2 participants