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: Optimize ActiveProposalLimiter storage reads #226

Merged
merged 2 commits into from
Jun 27, 2023

Conversation

Orland0x
Copy link
Contributor

@Orland0x Orland0x commented Jun 27, 2023

closes #220

cache the struct in memory, perform the checks and updates in memory, then finally write the memory struct back to storage.

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #226 (3742de0) into main (3bc77f3) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #226      +/-   ##
==========================================
+ Coverage   80.64%   80.68%   +0.04%     
==========================================
  Files          28       28              
  Lines         465      466       +1     
  Branches      111      111              
==========================================
+ Hits          375      376       +1     
  Misses         74       74              
  Partials       16       16              
Impacted Files Coverage Δ
src/utils/ActiveProposalsLimiter.sol 91.66% <100.00%> (+0.75%) ⬆️

@Orland0x Orland0x requested a review from pscott June 27, 2023 11:34
Copy link
Collaborator

@pscott pscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@Orland0x Orland0x merged commit c3b5e3d into main Jun 27, 2023
@Orland0x Orland0x deleted the audit_active_proposals_limiter_opt branch October 11, 2023 10:39
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: Optimize ActiveProposalLimiter storage reads
2 participants