Remove headers.h #1109

pull sipa wants to merge 3 commits into bitcoin:master from sipa:noheaders changing 48 files +925 −921
  1. sipa commented at 10:12 PM on April 15, 2012: member

    Removes the file headers.h, and all places where it was included. Some code movement was necessary to prevent strange dependencies, but there should be no semantic changes.

    Tested on Ubuntu and gitian.

  2. Remove headers.h 8aa614f4cf
  3. Move CWalletDB code to new walletdb module.
    In addition to standard code separation, this change opens the door
    to fixing several include inter-dependencies.
    acc8f329a3
  4. Move proto version to version.h. Reduce header deps a bit more. a21999f3f0
  5. sipa commented at 11:05 PM on April 15, 2012: member

    Seems @jgarzik was doing something similar. I've rebased his changes on top of mine now.

  6. sipa commented at 11:12 PM on April 15, 2012: member

    Tested builds of bitcoind and bitcoin-qt in gitian (linux and windows).

  7. sipa cross-referenced this on Apr 15, 2012 from issue Include dependency hierarchy is spaghetti by laanwj
  8. jgarzik commented at 11:17 PM on April 15, 2012: contributor

    ACK

  9. jgarzik cross-referenced this on Apr 15, 2012 from issue Move code to new walletdb module. Simplify header dependencies. by jgarzik
  10. jgarzik cross-referenced this on Apr 15, 2012 from issue Fix missing headers in addrman and netbase by luke-jr
  11. laanwj commented at 5:33 AM on April 16, 2012: member

    I've ran it through the graph-o-matic and it's even readable now! https://dev.visucore.com/bitcoin/includes_noheaders.svg

    This is much better.

    It does show there's one circular dependency left: ui_interface.h <-> util.h

  12. sipa cross-referenced this on Apr 16, 2012 from issue Further reduce header dependencies by sipa
  13. in src/util.h:None in a21999f3f0
      30 | @@ -31,11 +31,15 @@
      31 |  #include <openssl/sha.h>
      32 |  #include <openssl/ripemd.h>
      33 |  
      34 | -#include "netbase.h"
      35 | +#include "netbase.h" // for AddTimeData
      36 | +#include "ui_interface.h"
    


    laanwj commented at 1:08 PM on April 16, 2012:

    Is this include needed? (it causes a circular dependency, as ui_interface.h also includes util.h)


    sipa commented at 1:11 PM on April 16, 2012:

    No, I've removed it in #1112. It does require re-adding that include in other files, though.

  14. sipa commented at 6:04 PM on April 17, 2012: member

    Superceded by #1112

  15. sipa closed this on Apr 17, 2012

  16. suprnurd referenced this in commit 740fcce6a4 on Dec 5, 2017
  17. lateminer referenced this in commit 3c916d3b7b on Jan 22, 2019
  18. lateminer referenced this in commit 4771f6a7d7 on Dec 25, 2019
  19. bitcoin locked this on Sep 8, 2021

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-05-19 06:55 UTC