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

(refactor/core): Optimized loops in OmniPortal._clearNetwork() #2615

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RyanSea
Copy link
Contributor

@RyanSea RyanSea commented Dec 3, 2024

Removed subsequent SSLOAD's for length

Copy link
Contributor

@kevinhalliday kevinhalliday left a comment

Choose a reason for hiding this comment

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

Nice - thanks 🙏 One comment on naming

Comment on lines +460 to +462
XTypes.Chain storage c; uint256 totalShards;
uint256 totalNetworks = _network.length;
for (uint256 i = 0; i < totalNetworks; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

These aren't exaclty "totals" (network is a list of chains, each chain has a list of shards) so I'd suggest a rename.

Either literal

uint256 lenNetwork;
uint256 lenShards;

Or something shorthand / contexual

uint256 nChains;
uint256 nShards;

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