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

Remove sender from map when he has no more tracked transactions #4415

Merged
merged 9 commits into from
Sep 25, 2022

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented Sep 20, 2022

Signed-off-by: Fabio Di Fabio fabio.difabio@consensys.net

PR description

In the transaction pool a sender is tracked when he has transactions, but he is never removed from the internal tracking data structure when he has no more transactions in the pool, so once a sender is added he lives forever in the pool even if he has no transactions there.
This PR remove the sender from the internal map when his last transaction is removed.

Fixed Issue(s)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

@lgtm-com
Copy link

lgtm-com bot commented Sep 20, 2022

This pull request introduces 1 alert when merging 501381d into 5e15625 - view on LGTM.com

new alerts:

  • 1 for Missing format argument

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 force-pushed the remove-empty-transactions-by-sender branch from 501381d to 7b491b1 Compare September 20, 2022 18:50
@fab-10 fab-10 requested a review from shemnon September 21, 2022 06:55
@fab-10 fab-10 added the mainnet label Sep 21, 2022
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
# Conflicts:
#	CHANGELOG.md
#	ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/sorter/AbstractPendingTransactionsSorter.java
@fab-10 fab-10 force-pushed the remove-empty-transactions-by-sender branch from 38060e1 to c23001c Compare September 23, 2022 14:07
@fab-10 fab-10 requested a review from jflo September 23, 2022 17:48
@fab-10 fab-10 changed the title Remove sender from map when he has no more tracked transaction Remove sender from map when he has no more tracked transactions Sep 25, 2022
Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

LGTM.

CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 merged commit 1fbf703 into hyperledger:main Sep 25, 2022
@fab-10 fab-10 deleted the remove-empty-transactions-by-sender branch September 25, 2022 11:49
@jflo jflo mentioned this pull request Sep 26, 2022
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
…rledger#4415)


Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants