-
Notifications
You must be signed in to change notification settings - Fork 35.7k
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: Cleanup miner_tests #25073
The head ref may contain hidden characters: "2205-test-miner-\u{1F60A}"
test: Cleanup miner_tests #25073
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Code review ACK dddd32e My only criticism is on the last commit: before, it was clear that the |
Hmm. For reference, 38860f9#diff-b12066a688b85bea440eb38f079fb8ecc1984318470631bca7e3547a98effaa9 is doing the same change. It seems confusing to imply that the chainparams may differ in subsequent calls of the same function. Happy to add an assert that the "global" chainparams are the main params, if that helps? |
Rebased. Should still be trivial to re-ACK with |
fabdc19
to
faf2450
Compare
faf2450
to
facf0b5
Compare
Fixed feedback and rebased |
facf0b5
to
fa6a59c
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.
Concept ACK to removing unused chainparams
. Not sure if I understand why separate mempools that aren't m_node.mempool
is beneficial. Seems like clearing would be sufficient, but the goal is to remove clear()
?
Oh nice! I think that's good for this PR, I suppose we could do something like a Approach ACK! |
7407600
to
fa94406
Compare
fa94406
to
fac107b
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.
Code review ACK fac107b. Seems good to add scopes and stop hardcoding m_node.mempool
everywhere even if we still want to use shared mempools for now, to be able to make tests more lightweight later. Other changes look good too.
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.
Seems fine to me. I had a few questions and wonder if other cleanups are possible too...
No need for a shared mempool. Also remove unused chainparams parameter.
No need for a shared mempool. Also remove unused chainparams parameter.
No need for a shared mempool. Also remove unused chainparams parameter. Can be reviewed with --ignore-all-space
fac107b
to
faa1552
Compare
Rebased, Squashed, and replied to comments |
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.
utACK faa1552
faa1552 test: Use dedicated mempool in TestBasicMining (MacroFake) fafab38 test: Use dedicated mempool in TestPackageSelection (MacroFake) fa4055d test: Use dedicated mempool in TestPrioritisedMining (MacroFake) fa29218 test: Pass mempool reference to AssemblerForTest (MacroFake) Pull request description: This cleans up the miner tests: * Removes duplicate/redundant and thus confusing chainparams object. * Uses a fresh mempool for each subtest instead of using the "global" one from the testing setup. This makes it easier to follow the tests in smaller scopes. Also it makes sure the mempool is truly cleared by reconstructing it. Finally, this removes calls to `clear`, see bitcoin#19909 ACKs for top commit: glozow: utACK faa1552 Tree-SHA512: ced1260f6ab70fba74b0fac7ff4fc7adfddcd2f3bee785249d2a4a9055ac253eff9090edbda7a17e72a71a81b56ff708d5ff64e1f57ebc7b7747d6c88fec51e3
This cleans up the miner tests:
clear
, see refactor: Remove unused CTxMemPool::clear() helper #19909