refactor: remove more dead code #36509

pull fanquake wants to merge 27 commits into bitcoin:master from fanquake:more_dead_removal changing 35 files +4 −129
  1. fanquake commented at 6:38 AM on October 13, 2026: member

    Part of #36167.

  2. DrahtBot added the label Refactoring on Oct 13, 2026
  3. DrahtBot commented at 6:38 AM on October 13, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    Type Reviewers
    ACK stickies-v

    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 <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 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36183.svg"></sub> (span: diagnose dangling views from MakeByteSpan/MakeUCharSpan by kevkevinpal)
    • #36167 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36167.svg"></sub> ([RFC] Enable -Wunused by fanquake)
    • #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 <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-->

  4. fanquake force-pushed on Oct 13, 2026
  5. DrahtBot added the label CI failed on Oct 13, 2026
  6. DrahtBot commented at 6:44 AM on October 13, 2026: contributor

    <!--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>

  7. maflcko commented at 6:56 AM on October 13, 2026: member

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

  8. fanquake force-pushed on Oct 13, 2026
  9. fanquake force-pushed on Oct 13, 2026
  10. fanquake referenced this in commit 143e25b35b on Oct 14, 2026
  11. fanquake referenced this in commit 5bd2a6bcf9 on Oct 14, 2026
  12. hebasto referenced this in commit 173ec9a06c on Oct 14, 2026
  13. span: remove unused MakeWritableUCharSpan d28d1a9809
  14. netbase: remove unused Proxy::GetFamily d7c16aa057
  15. kernel: remove unused MemPoolLimits::NoLimits 98136193f6
  16. test: remove unused GetMockableDatabase declaration 1595964181
  17. ipc: remove unused FooImplementation::passBlockState
    The capnp method and its test were removed in 6077157531.
    5eddbb45c2
  18. script: remove unused FillableSigningProvider::GetCScripts
    The last caller (dumpwallet) was removed in 8ede6dea0c.
    101345feaa
  19. qt: remove unused ClientModel::isReleaseVersion 50fb338f94
  20. qt: remove unused QValueComboBox::setRole 2fecbfd1e1
  21. qt: remove unused OptionsDialog::proxyIpChecks signal 8a8a46d7b6
  22. qt: remove unused TrafficGraphWidget::getGraphRange a781e48289
  23. refactor: remove unused BinarySemaphoreGrant alias 71f598018b
  24. policy: remove unused EXTRA_DESCENDANT_TX_SIZE_LIMIT 54fe34c6b3
  25. addrman: remove unused AddrMan::Unserialize(AutoFile&) instantiation fb7a3aef1b
  26. logging: remove unused Logger::AddCategoryLogLevel 664c2f4600
  27. fuzz: remove unused MockedDescriptorConverter::IdIsXpub d6ffa22e28
  28. refactor: remove unused ScriptHash(const CScriptID&) constructor 830a95548a
  29. qt: remove unused COLOR_BLACK fc21d18741
  30. fanquake force-pushed on Oct 14, 2026
  31. fanquake force-pushed on Oct 14, 2026
  32. fuzz: remove unused FuzzedWallet::GetScriptPubKey 3f40af4672
  33. qt: remove stale PeerTablePriv forward declaration 4881802c3f
  34. fanquake force-pushed on Oct 14, 2026
  35. qt: remove unused removeAllWallets 92ad4ad404
  36. qt: remove unused BitcoinAmountField::SetMaxValue f226197c00
  37. qt: remove unused BitcoinAmountField::setReadOnly 3a3e0ced8c
  38. qt: remove unused ClientModel::getNumBlocks and its cache 18a5e90179
  39. qt: remove unused AddressBookPage::sendCoins signal 2e23a5b1f1
  40. qt: remove unused WalletController::m_options_model e8a70c0c68
  41. fanquake force-pushed on Oct 14, 2026
  42. test: remove unused equal from check_equal() 7981e61764
  43. build: enable -Wunused-macros & -Wunused-template 570c4a184f
  44. DrahtBot removed the label CI failed on Oct 14, 2026
  45. fanquake force-pushed on Oct 14, 2026
  46. Sjors referenced this in commit c0eccd96bb on Oct 14, 2026
  47. in src/qt/clientmodel.cpp:136 in 570c4a184f
     126 | @@ -129,15 +127,6 @@ std::map<CNetAddr, LocalServiceInfo> ClientModel::getNetLocalAddresses() const
     127 |      return m_node.getNetLocalAddresses();
     128 |  }
     129 |  
     130 | -
     131 | -int ClientModel::getNumBlocks() const
     132 | -{
     133 | -    if (m_cached_num_blocks == -1) {
     134 | -        m_cached_num_blocks = m_node.getNumBlocks();
    


    stickies-v commented at 9:55 AM on October 14, 2026:

    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 commented at 2:48 AM on October 15, 2026:

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

  48. stickies-v approved
  49. stickies-v commented at 10:34 AM on October 14, 2026: contributor

    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)


github-metadata-mirror

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-10-19 19:52 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me