-
Notifications
You must be signed in to change notification settings - Fork 108
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
Test if the mempool storage is cleared #2815
Test if the mempool storage is cleared #2815
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.
I like the tests and they do seem useful 👍
There are just a few minor issues
74f0f5c
to
68ae5ae
Compare
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 great, thanks for adding more test coverage!
I want to merge these now, so I can base the block gossip tests on them.
It looks like Conrado has approved all the changes
Actually, I'm not sure how to resolve these conflicts, so I'll let @jvff do it. |
Make it consistent with other test modules and prepare for adding property tests.
Make it consistent with the general guidelines followed on other modules.
Allow these types to be used in other crates for testing purposes.
Make it easy to generate random `ChainTipBlock`s for usage in property tests.
Reduce the repeated test configuration attributes and make it easier to see what is test specific and what is part of the general implementation.
Performs a dummy call just so that `poll_ready` gets called.
Replace the custom dummy requests with the helper method.
A chain reset should force the mempool storage to be cleared so that transaction verification can restart using the new chain tip.
If the block synchronizer falls behind and then starts catching up again, the mempool should be disabled and therefore the storage should be cleared.
68ae5ae
to
c9a2d92
Compare
Merge conflicts solved. @conradoplg, could you please take another look to see if I haven't missed anything? 😅 |
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!
Motivation
This started as part of the work for #2723, but @teor2345 realized that this had already been implemented by @conradoplg as part of #2786. I scrapped the original implementation, but thought that maybe the property tests I had written might be useful to keep.
Solution
This PR contains two PRs. Both test if the mempool storage should be cleared, but on different events:
Review
@conradoplg and @teor2345. I think the most important thing to decide in this review is if these tests are useful or just redundant.
Reviewer Checklist