refactor: remove more dead code #36509

Manually merged
fanquake merged 27 commits from more_dead_removal into master 2026-10-21 11:13:59 +00:00 AGit
fanquake commented 2026-10-13 06:38:36 +00:00 (Migrated from github.com)

Part of #36167.

Part of #36167.
DrahtBot commented 2026-10-13 06:38:49 +00:00 (Migrated from github.com)

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

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK stickies-v, sedited

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #bitcoin-core/gui/866 (Enhanced Traffic Graph Widget with Multi-timeframe Support and Data Persistence by rebroad)
  • #36183 (span: diagnose dangling views from MakeByteSpan/MakeUCharSpan by kevkevinpal)
  • #36167 ([RFC] Enable -Wunused by fanquake)
  • #34038 (logging: replace -loglevel with -trace, expose trace logging via RPC by ajtowns)
  • #31507 (build: Use clang-cl to build on Windows natively 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.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36509 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36509.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36509#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | ACK | [stickies-v](https://github.com/bitcoin/bitcoin/pull/36509#pullrequestreview-5516146522), [sedited](https://github.com/bitcoin/bitcoin/pull/36509#pullrequestreview-5598675153) | If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore. <!--174a7506f384e20aa4161008e828411d--> ### Conflicts Reviewers, this pull request conflicts with the following ones: * [#bitcoin-core/gui/866](https://github.com/bitcoin-core/gui/pull/866) <sub><img src="https://drahtbot.space/ack_count/bitcoin-core/gui/866.svg"></sub> (Enhanced Traffic Graph Widget with Multi-timeframe Support and Data Persistence by rebroad) * [#36183](https://github.com/bitcoin/bitcoin/pull/36183) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36183.svg"></sub> (span: diagnose dangling views from MakeByteSpan/MakeUCharSpan by kevkevinpal) * [#36167](https://github.com/bitcoin/bitcoin/pull/36167) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36167.svg"></sub> ([RFC] Enable `-Wunused` by fanquake) * [#34038](https://github.com/bitcoin/bitcoin/pull/34038) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34038.svg"></sub> (logging: replace -loglevel with -trace, expose trace logging via RPC by ajtowns) * [#31507](https://github.com/bitcoin/bitcoin/pull/31507) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/31507.svg"></sub> (build: Use clang-cl to build on Windows natively 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. <!--5faf32d7da4f0f540f40219e4f7537a3-->
DrahtBot commented 2026-10-13 06:44:11 +00:00 (Migrated from github.com)

🚧 At least one of the CI tasks failed.
Task lint: https://github.com/bitcoin/bitcoin/actions/runs/38357868565/job/115164865222
LLM reason (✨ experimental): CI failed on the lint check: src/qt/clientmodel.cpp includes bitcoin-build-config.h without using any symbols from it.

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

<!--85328a0da195eb286784d51f73fa0af9--> 🚧 At least one of the CI tasks failed. <sub>Task `lint`: https://github.com/bitcoin/bitcoin/actions/runs/38357868565/job/115164865222</sub> <sub>LLM reason (✨ experimental): CI failed on the lint check: `src/qt/clientmodel.cpp` includes `bitcoin-build-config.h` without using any symbols from it.</sub> <details><summary>Hints</summary> Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example: * Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch. * A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test. * An intermittent issue. Leave a comment here, if you need help tracking down a confusing failure. </details>
First-time contributor

Base: 173ec9a06cf6a1619a1d62cbace6520c1ada0201
Head: 570c4a184f49b6d71bc581ae694b969a91cf2510

No verified findings are available from this review.

Review coverage was incomplete. adversarial: AddrMan deserialization callers were not traced to confirm that removing the Unserialize(AutoFile&) explicit instantiation leaves every used stream type supported. adversarial_glm: Output failed validation: Finding must identify a changed file: 'src/node/interfaces.cpp' verifier: The AddrMan deserialization gap was checked: the production file-loading path deserializes through HashVerifier, and the stream-based reader uses DataStream; no plain AutoFile deserialization caller was found. The node interface's getNumBlocks declaration and implementation remain, separate from the removed Qt ClientModel accessor. verifier: A complete caller audit of every removed API was not finished. In particular, callers of BitcoinAmountField::setReadOnly were not verified.

Full review report

<!-- forgejo-review-bot:bitcoin/bitcoin --> Base: `173ec9a06cf6a1619a1d62cbace6520c1ada0201` Head: `570c4a184f49b6d71bc581ae694b969a91cf2510` No verified findings are available from this review. Review coverage was incomplete. adversarial: AddrMan deserialization callers were not traced to confirm that removing the Unserialize(AutoFile&) explicit instantiation leaves every used stream type supported. adversarial_glm: Output failed validation: Finding must identify a changed file: 'src/node/interfaces.cpp' verifier: The AddrMan deserialization gap was checked: the production file-loading path deserializes through HashVerifier<AutoFile>, and the stream-based reader uses DataStream; no plain AutoFile deserialization caller was found. The node interface's getNumBlocks declaration and implementation remain, separate from the removed Qt ClientModel accessor. verifier: A complete caller audit of every removed API was not finished. In particular, callers of BitcoinAmountField::setReadOnly were not verified. [Full review report](<https://review.fish.foo/traces/36509-570c4a184f49b6d71bc581ae694b969a91cf2510-759-9.html>)
maflcko commented 2026-10-13 06:56:06 +00:00 (Migrated from github.com)

I guess there is no compiler check to find them and they were found manually?

I guess there is no compiler check to find them and they were found manually?
stickies-v (Migrated from github.com) approved these changes 2026-10-14 10:34:37 +00:00
stickies-v (Migrated from github.com) left a comment

ACK 570c4a184f

The biggest risk from this change imo is behaviour change from alternative overloads or overrides being selected, but I could not find any such cases here (ScriptHash(const CScriptID&), FillableSigningProvider::GetCScripts and AddrMan::Unserialize(AutoFile&) all look fine)

ACK 570c4a184f49b6d71bc581ae694b969a91cf2510 The biggest risk from this change imo is behaviour change from alternative overloads or overrides being selected, but I could not find any such cases here (`ScriptHash(const CScriptID&)`, `FillableSigningProvider::GetCScripts` and `AddrMan::Unserialize(AutoFile&)` all look fine)
stickies-v (Migrated from github.com) commented 2026-10-14 09:55:46 +00:00

not blocking: interfaces::Node::getNumBlocks now no longer has a called either, can be removed too I think?

(same for getLastBlockTime and getVerificationProgress but that was already true before this pull)

not blocking: `interfaces::Node::getNumBlocks` now no longer has a called either, can be removed too I think? (same for `getLastBlockTime` and `getVerificationProgress` but that was already true before this pull)
fanquake (Migrated from github.com) reviewed 2026-10-15 02:48:37 +00:00
fanquake (Migrated from github.com) commented 2026-10-15 02:48:37 +00:00

I'm going to leave any interface-related changes for now (there are also more than the above).

I'm going to leave any interface-related changes for now (there are also more than the above).
sedited (Migrated from github.com) approved these changes 2026-10-21 11:02:34 +00:00
sedited (Migrated from github.com) left a comment
ACK 570c4a184f49b6d71bc581ae694b969a91cf2510
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!36509
No description provided.