Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Jan 16, 2023

Requested in #25781 (comment), but adding getters seems unrelated from removing globals, so I split it out for now.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 16, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK dergoegge, brunoerg

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #26969 (net: net_processing, add ProcessCompactBlockTxns by brunoerg)
  • #26247 (refactor: Make m_mempool optional in PeerManager by MarcoFalke)
  • #25977 (refactor: Replace std::optional<bilingual_str> with util::Result by 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.

@maflcko
Copy link
Member Author

maflcko commented Jan 16, 2023

Required for #25781 in either case

@dergoegge
Copy link
Member

Code review ACK faf7b4f

Copy link
Contributor

@brunoerg brunoerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crACK faf7b4f

@maflcko maflcko merged commit 9a28843 into bitcoin:master Jan 27, 2023
@maflcko maflcko deleted the 2301-blockman-fun-💭 branch January 27, 2023 16:51
{
if (fImporting) return "Importing...";
if (fReindex) return "Reindexing...";
if (m_chainman.m_blockman.LoadingBlocks()) return "Loading blocks ...";
Copy link
Member

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.

sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jan 27, 2023
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Dec 19, 2023
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
@bitcoin bitcoin locked and limited conversation to collaborators Mar 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants