CCheckQueue has stored its work items in a queue, but made no guarantee about the order of elements in that container. This PR extracts that data storage handling into a separate container class Bag. This is pure refactoring, the result should have a better separation of concerns, adds tests for the new container, and makes it now easier to separately test and optimize the container.
refactor: extract CCheckQueue's data handling into a separate container "Bag" #27331
pull martinus wants to merge 2 commits into bitcoin:master from martinus:2023-03-bag changing 5 files +209 −13-
martinus commented at 2:48 PM on March 25, 2023: contributor
-
DrahtBot commented at 2:48 PM on March 25, 2023: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage
For detailed information about the code coverage, see the test coverage report.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK jonatack If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #30664 (build: Remove Autotools-based build system by hebasto)
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.
- DrahtBot added the label Refactoring on Mar 25, 2023
- martinus force-pushed on Mar 25, 2023
- DrahtBot added the label Needs rebase on May 30, 2023
-
jonatack commented at 11:32 PM on July 19, 2023: member
Approach ACK 6b0537c4a71fe774ea12c097d5c16dc2a8ebb0a2
Needs trivial rebase, an adjacent Makefile entry and include header.
- martinus force-pushed on Jul 22, 2023
- DrahtBot removed the label Needs rebase on Jul 22, 2023
- DrahtBot added the label CI failed on Jul 22, 2023
-
674a65d72e
refactor: Bag: an unordered container
This introduces a simple container where elements can be added and removed. The order of element removal is not specified and might change in future due to e.g. optimizations. The logic for that container is purely copied from CCheckQueue's current implementation of the queue.
-
6a9c6ea973
refactor: use Bag in checkqueue
This simplfies CCheckQueue's Loop by using the new Bag container.
- martinus force-pushed on Jul 22, 2023
- DrahtBot removed the label CI failed on Jul 22, 2023
-
jonatack commented at 2:18 AM on July 23, 2023: member
ACK 6a9c6ea9734854a2438d180ae13f123170e96d4c
- achow101 requested review from sipa on Sep 20, 2023
- DrahtBot added the label CI failed on Nov 13, 2023
- DrahtBot removed the label CI failed on Nov 13, 2023
- DrahtBot added the label CI failed on Jan 13, 2024
- achow101 requested review from fjahr on Apr 9, 2024
-
fjahr commented at 7:37 PM on April 27, 2024: contributor
I didn't dive too deeply into this yet but it's a bit sad that we can not remove more code due to this, that would certainly make it a more interesting change. Do you already have other places in mind where we could use this?
You also mention the order of elements, but it's unclear why that is important. This hasn't changed right? Or is this just about the naming choice?
I can't really make sense of the CI failure. Could you do a rebase? Since this is a fairly old change it might be some hidden merge conflict.
-
DrahtBot commented at 12:35 AM on July 26, 2024: contributor
<!--2e250dc3d92b2c9115b66051148d6e47-->
🤔 There hasn't been much activity lately and the CI seems to be failing.
If no one reviewed the current pull request by commit hash, a rebase can be considered. While the CI failure may be a false positive, the CI hasn't been running for some time, so there may be a real issue hiding as well. A rebase triggers the latest CI and makes sure that no silent merge conflicts have snuck in.
- hebasto added the label Needs CMake port on Aug 16, 2024
- maflcko removed the label Needs CMake port on Aug 29, 2024
-
DrahtBot commented at 10:46 PM on September 2, 2024: contributor
<!--cf906140f33d8803c4a75a2196329ecb-->
🐙 This pull request conflicts with the target branch and needs rebase.
- DrahtBot added the label Needs rebase on Sep 2, 2024
-
achow101 commented at 2:22 PM on October 15, 2024: member
This PR does not seem to have attracted much attention from reviewers. As such, it does not seem important enough right now to keep it sitting idle in the list of open PRs.
Closing due to lack of interest.
- achow101 closed this on Oct 15, 2024
- bitcoin locked this on Oct 15, 2025