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

fix: txpool concurrent map issue #252

Merged

Conversation

andyzhang2023
Copy link
Contributor

Description

This PR is for fixing the issue of concurrent map reading and writing on the map of txpool.queue.
It was introduced by PR #247 , in which the numbers of pending and queued transactions were added to logs.
The txpool.queue and txpool.pending should always be protected by the mu lock of txpool, So we use Stats() instead of stats();
Besides, there is no need to iterator the pending and queue lists to sum the total numbers. The variables pendingCounter and queueCounter records them.

@github-actions github-actions bot requested review from redhdx and welkin22 January 11, 2025 05:47
@andyzhang2023 andyzhang2023 requested a review from bnoieh January 13, 2025 02:58
Copy link
Contributor

@krish-nr krish-nr left a comment

Choose a reason for hiding this comment

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

LGTM

@owen-reorg owen-reorg changed the title Fix txpool concurrent map issue fix: txpool concurrent map issue Jan 13, 2025
@owen-reorg owen-reorg merged commit b661934 into bnb-chain:develop Jan 13, 2025
2 checks passed
will-2012 pushed a commit to will-2012/op-geth that referenced this pull request Feb 6, 2025
…-registry

Remove hardfork activation time overrides
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.

5 participants