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

Feat: optimize mempool iteration by skipping last invocation #5219

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

kantai
Copy link
Member

@kantai kantai commented Sep 20, 2024

The mempool iteration is invoked by the stacks miner to iterate over a mempool. However, the loop exit condition (num_considered == 0) means that there's always an additional "empty" invocation after the mempool has been cleared. This change eliminates that by returning the reason that the iteration exited.

@kantai kantai requested a review from a team as a code owner September 20, 2024 17:57
Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

LGTM!

@kantai kantai added this pull request to the merge queue Sep 20, 2024
Merged via the queue into develop with commit b5250c6 Sep 20, 2024
1 check passed
@blockstack-devops
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants