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

mempool: modify maintain_transaction_pool to prune txs #1485

Merged
merged 15 commits into from
Oct 28, 2024

Conversation

tcoratger
Copy link
Collaborator

Should close #1478

  • We maintain a hashmap of transactions that were at one time in the pool with the timestamp of the first time we found them.
  • We empty this hashmap with the mined transactions that are progressively included in the last block and that are pruned correctly.
  • In addition, we also prune transactions that are still in the mempool at the moment we look and that have been in it for more than 5 minutes.
  • A unit test is here to validate the proper behaviour.

cc @greged93 @ClementWalter @eugypalu

src/pool/mempool.rs Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/pool/mempool.rs Outdated Show resolved Hide resolved
src/pool/mempool.rs Outdated Show resolved Hide resolved
@tcoratger tcoratger force-pushed the maintain_transaction_pool1 branch from d00e266 to 30a8306 Compare October 28, 2024 14:30
@greged93 greged93 merged commit 129b6f8 into kkrt-labs:main Oct 28, 2024
7 checks passed
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.

Prune the mempool [0.5]
4 participants