-
Notifications
You must be signed in to change notification settings - Fork 839
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
Layered txpool: do not send notifications when moving tx between layers #7539
Layered txpool: do not send notifications when moving tx between layers #7539
Conversation
0a770d5
to
cb4b59f
Compare
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
cb4b59f
to
b032acc
Compare
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
0ded40e
to
26bcb4d
Compare
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
26bcb4d
to
77e238c
Compare
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question, otherwise LGTM.
@@ -207,14 +208,14 @@ public void addRemoteTransactions() { | |||
createRemotePendingTransaction(transaction0), Optional.empty()); | |||
assertThat(pendingTransactions.size()).isEqualTo(1); | |||
|
|||
assertThat(getAddedCount(REMOTE, NO_PRIORITY, layers.prioritizedTransactions.name())) | |||
assertThat(getAddedCount(REMOTE, NO_PRIORITY, NEW, layers.prioritizedTransactions.name())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that you are only using the reason "NEW" in this file. Is that because other reasons don't make a difference here? Do the tests in LayersTest cover all the functionality that has changed with the "reasons"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using only NEW
here because we are only adding new txs to the pool, and not moving existing txs between layers. Will review if more tests are needed to cover everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added tests to cover also the move of txs between layers
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
PR description
Notifications for tx added to the layered txpool were incorrectly sent also when the tx was already added and was just internally moved between layers, potentially resulting in duplicated notifications.
Tests for this change are part of the following PR #7538 that is also fixing the drop notifications.
Fixed Issue(s)
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests