-
Notifications
You must be signed in to change notification settings - Fork 120
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
Avoid broadcasting mempool rejected or expired transactions to peers #2858
Conversation
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.
Looks good!
We could merge the code as-is.
But it still needs a test for each kind of skipped transaction ID.
I also made some suggestions to simplify the code.
The linked issue is in the sprint, so this PR doesn't need to be in the sprint as well. |
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.
👍
Motivation
We want to avoid sending transactions to peers that were rejected or expired. Resolves #2846 if merged.
Solution
Broadcast only if the transaction returns
Ok
from theinsert
method. Also remove transactions that are expired.Review
I think the intersection code can be simplified so i am looking for suggestions there. Also this code does not have a specific test.