-
Notifications
You must be signed in to change notification settings - Fork 38.6k
refactor: Add BlockManager getters #26900
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
The head ref may contain hidden characters: "2301-blockman-fun-\u{1F4AD}"
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. 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. |
|
Required for #25781 in either case |
facd93b to
faf7b4f
Compare
|
Code review ACK faf7b4f |
brunoerg
left a comment
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.
crACK faf7b4f
| { | ||
| if (fImporting) return "Importing..."; | ||
| if (fReindex) return "Reindexing..."; | ||
| if (m_chainman.m_blockman.LoadingBlocks()) return "Loading blocks ..."; |
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.
Nice refactoring. It looks like there is also a minor user-facing behavior change here, but at first glance only affecting RPC getblockfrompeer and probably not an issue.
Summary: A dependency of a dependency of an assumeutxo related backport uses `IsPruneMode`, so let's backport these getters. There are some callsites in init.cpp missing in this diff due to a missing backport related to a warning when the disk space is low.There is no risk of breaking anything if this is backported later and it does not seem very important. > Add BlockManager::LoadingBlocks() bitcoin/bitcoin@fa0f043 > Add BlockManager::GetPruneTarget() bitcoin/bitcoin@fae71fe > Add BlockManager::IsPruneMode() bitcoin/bitcoin@faf7b4f This is a backport of [[bitcoin/bitcoin#26900 | core#26900]] Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D15003
Requested in #25781 (comment), but adding getters seems unrelated from removing globals, so I split it out for now.