The user knows which option they passed to the program, so it seems overly verbose to offer the user feedback whether or not they passed -reindex. Treat it as DISK, like all other cases that are treated as DISK:
-reindex-chainstate-loadblock
The user knows which option they passed to the program, so it seems overly verbose to offer the user feedback whether or not they passed -reindex. Treat it as DISK, like all other cases that are treated as DISK:
-reindex-chainstate-loadblock<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | john-moffett, hebasto |
| Stale ACK | LarryRuane |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, 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.
For reference:
-reindex-chainstate remains unchanged:

-loadblock remains unchanged:

-reindex stage 2 remains unchanged:

-reindex stage 1 (master):

-reindex stage 1 (this pull):

So the only user-visible change should be changing the word "Reindex" to "Index"
Concept ACK.
As this PR touches code outside the src/qt directory, i.e., src/interfaces/node.h and src/node/interfaces.cpp, should it be moved to the main repo for a broader reviewing?
It is only changing an interface that the gui uses, so I think it should be fine
cc @ryanofsky
155 | - return BlockSource::DISK; 156 | - else if (getNumConnections() > 0) 157 | - return BlockSource::NETWORK; 158 | - 159 | + if (m_node.isLoadingBlocks()) return BlockSource::DISK; 160 | + if (getNumConnections() > 0) return BlockSource::NETWORK;
I like this, somehow else following return (or break, continue) doesn't seem right.
code-review, tested ACK fa200442946437f6de8aec95487ccbb541cc485b
I ran src/qt/bitcoin-qt -noconnect -signet -reindex with and without the PR, and the status message (lower-left corner) for stage 1 was as expected. I didn't try reindex-chainstate, loadblock, or reindex stage 2.
ACK fa200442946437f6de8aec95487ccbb541cc485b
Nit: Maybe remove the one remaining unnecessary enum use for BlockSource?
Thanks, removed and rebased. Should be trivial to re-ACK with git range-diff
Re-ACK faff2ba4f80fad5af63a31559fd4065e631a8166
ACK faff2ba4f80fad5af63a31559fd4065e631a8166, I have reviewed the code and it looks OK, I agree it can be merged.
post-merge re-ACK