Requested in #25781 (review), but adding getters seems unrelated from removing globals, so I split it out for now.
refactor: Add BlockManager getters #26900
pull maflcko wants to merge 3 commits into bitcoin:master from maflcko:2301-blockman-fun-💠changing 9 files +52 −44-
maflcko commented at 4:20 PM on January 16, 2023: member
-
Add BlockManager::LoadingBlocks() fa0f0436d8
-
Add BlockManager::GetPruneTarget() fae71fe27e
-
DrahtBot commented at 4:21 PM on January 16, 2023: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See 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.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #26969 (net: net_processing, add
ProcessCompactBlockTxnsby brunoerg) - #26247 (refactor: Make m_mempool optional in PeerManager by MarcoFalke)
- #25977 (refactor: Replace
std::optional<bilingual_str>withutil::Resultby ryanofsky) - #25740 (assumeutxo: background validation completion by jamesob)
- #25665 (refactor: Add util::Result failure values, multiple error and warning messages by ryanofsky)
- #25574 (validation: Improve error handling when VerifyDB fails due to insufficient dbcache by mzumsande)
- #25193 (indexes: Read the locator's top block during init, allow interaction with reindex-chainstate by mzumsande)
- #24230 (indexes: Stop using node internal types and locking cs_main, improve sync logic by ryanofsky)
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.
- #26969 (net: net_processing, add
- DrahtBot added the label Refactoring on Jan 16, 2023
-
Add BlockManager::IsPruneMode() faf7b4f1fc
- maflcko force-pushed on Jan 16, 2023
-
dergoegge commented at 11:09 AM on January 17, 2023: member
Code review ACK faf7b4f1fc35f1488567e0e4a57ecb348596b992
- brunoerg approved
-
brunoerg commented at 6:54 PM on January 26, 2023: contributor
crACK faf7b4f1fc35f1488567e0e4a57ecb348596b992
- maflcko merged this on Jan 27, 2023
- maflcko closed this on Jan 27, 2023
- maflcko deleted the branch on Jan 27, 2023
-
in src/net_processing.cpp:1730 in faf7b4f1fc
1726 | @@ -1730,8 +1727,7 @@ bool PeerManagerImpl::BlockRequestAllowed(const CBlockIndex* pindex) 1727 | 1728 | std::optional<std::string> PeerManagerImpl::FetchBlock(NodeId peer_id, const CBlockIndex& block_index) 1729 | { 1730 | - if (fImporting) return "Importing..."; 1731 | - if (fReindex) return "Reindexing..."; 1732 | + if (m_chainman.m_blockman.LoadingBlocks()) return "Loading blocks ...";
jonatack commented at 5:27 PM on January 27, 2023: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.
sidhujag referenced this in commit ddf6668248 on Jan 27, 2023Fabcien referenced this in commit a4ff6eb1a9 on Dec 19, 2023bitcoin locked this on Mar 19, 2024Labels
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 21:13 UTC
More mirrored repositories can be found on mirror.b10c.me