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

set frontier_log to last log that decodes and break #222

Merged
merged 1 commit into from
Feb 3, 2021

Conversation

4meta5
Copy link
Contributor

@4meta5 4meta5 commented Feb 2, 2021

closes #217

What important points reviewers should know?

initial suggestion

The previous loop set frontier_log to the last log that is_some (after a try_to decode attempt) in notification.header.digest.logs. If there are no logs that are is_some, then it is None.

The new loop starts from the end and goes backwards; it sets frontier_log to the last log that is_some and then breaks from the loop instead of going over all the logs every time. Worst case is still the same, but, if not worst case, this is better because it breaks early.

Checklist

This is a small change to how the logic is expressed, but doesn't change the underlying logic.

  • No purge of network required
  • No version bumps required
  • No changes to docs

@4meta5 4meta5 added A0-pleasereview Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low Does not elevate a release containing this beyond "low priority". labels Feb 2, 2021
@4meta5 4meta5 changed the title set to frontier_log to last log that decodes and break set frontier_log to last log that decodes and break Feb 2, 2021
@JoshOrndorff JoshOrndorff merged commit e275847 into master Feb 3, 2021
@JoshOrndorff JoshOrndorff deleted the amar-log-loop branch February 3, 2021 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-pleasereview Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low Does not elevate a release containing this beyond "low priority".
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance Improvement in pending transactions
3 participants