Remove unused code #9987

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:remove-unused-code changing 13 files +0 −78
  1. practicalswift commented at 11:40 PM on March 13, 2017: contributor

    No description provided.

  2. dcousens approved
  3. dcousens commented at 12:00 AM on March 14, 2017: contributor

    utACK

  4. fanquake added the label Refactoring on Mar 14, 2017
  5. NicolasDorier commented at 5:31 AM on March 14, 2017: contributor

    utACK

  6. in src/dbwrapper.h:None in b6eef0de32 outdated
     131 | @@ -132,10 +132,6 @@ class CDBIterator
     132 |          return true;
     133 |      }
     134 |  
     135 | -    unsigned int GetKeySize() {
    


    paveljanik commented at 7:54 AM on March 14, 2017:

    GetKeySize is referenced in the comment in src/coins.h.


    practicalswift commented at 10:18 PM on March 15, 2017:

    @paveljanik Good point! Reference in src/coins.h removed. Squashed and pushed as well :-)

  7. practicalswift force-pushed on Mar 15, 2017
  8. JeremyRubin commented at 6:47 AM on March 16, 2017: contributor

    I'd suggest reverting interpreter.cpp, unless anyone strongly objects. Seeing those (albeit unused) static consts helped me to understand the script code more quickly.

  9. practicalswift commented at 7:14 AM on March 16, 2017: contributor

    @JeremyRubin Perhaps I should add them back but commented out. Sounds good? :-)

  10. laanwj commented at 10:20 AM on March 16, 2017: member

    I'd suggest reverting interpreter.cpp, unless anyone strongly objects. Seeing those (albeit unused) static consts helped me to understand the script code more quickly.

    Agree, let's just put those back. There is zero overhead to defining a few extra constants for clarity even if unused.

  11. in src/wallet/db.h:None in 20da129626 outdated
     299 | @@ -300,12 +300,6 @@ class CDB
     300 |          return (ret == 0);
     301 |      }
     302 |  
     303 | -    bool ReadVersion(int& nVersion)
    


    laanwj commented at 10:22 AM on March 16, 2017:

    We probably want to keep this one around for symmetry. Sometimes blindly removing unused code can cause an API to become lopsided, and cause methods to go missing which clearly will have a use at some point, and it just indicates more tests are needed. This seems applicable here.

  12. jonasschnelli commented at 11:48 AM on March 16, 2017: contributor

    utACK 20da129626849511b41a870333dd0144eeaf0c6d, agree with @laanwj about ReadVersion().

  13. in src/chainparams.h:65 in 20da129626 outdated
      60 | @@ -61,8 +61,6 @@ class CChainParams
      61 |      int GetDefaultPort() const { return nDefaultPort; }
      62 |  
      63 |      const CBlock& GenesisBlock() const { return genesis; }
      64 | -    /** Make miner wait to have peers to avoid wasting work */
      65 | -    bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
    


    MarcoFalke commented at 12:21 AM on March 17, 2017:

    Either keep everything or remove the member as well, no?

  14. MarcoFalke commented at 12:24 AM on March 17, 2017: member

    ACK on removing the clearly outdated code (such as in test/) Not sure about the gains on removing some of the other methods.

  15. Remove unused code 8dc957ae06
  16. practicalswift force-pushed on Mar 17, 2017
  17. practicalswift commented at 3:40 AM on March 17, 2017: contributor

    @JeremyRubin @laanwj The changes to interpreter.cpp have now been reverted as suggested. @laanwj @jonasschnelli ReadVersion(int& nVersion) is now kept around for symmetry. @MarcoFalke Thanks for noticing! fMiningRequiresPeers has now been removed as well :-)

    Thanks for reviewing! Please let me know if any further adjustments are needed.

  18. dcousens approved
  19. dcousens commented at 3:48 AM on March 17, 2017: contributor

    re-ACK

  20. laanwj merged this on Mar 18, 2017
  21. laanwj closed this on Mar 18, 2017

  22. laanwj referenced this in commit aab1e55860 on Mar 18, 2017
  23. PastaPastaPasta referenced this in commit 4f437bb5ce on Mar 10, 2019
  24. PastaPastaPasta referenced this in commit 9727c3e16f on Mar 11, 2019
  25. PastaPastaPasta referenced this in commit b3b69bef46 on Mar 11, 2019
  26. PastaPastaPasta referenced this in commit c6626ed0b3 on Mar 12, 2019
  27. PastaPastaPasta referenced this in commit e36935efcd on Mar 13, 2019
  28. UdjinM6 referenced this in commit cb7a475f0d on Mar 13, 2019
  29. PastaPastaPasta referenced this in commit bce0a7afbc on Mar 13, 2019
  30. PastaPastaPasta referenced this in commit 11185273ad on Mar 14, 2019
  31. PastaPastaPasta referenced this in commit 32221d37db on Mar 14, 2019
  32. PastaPastaPasta referenced this in commit 8ebb775d4f on Mar 15, 2019
  33. PastaPastaPasta referenced this in commit c3b425e2e2 on Mar 16, 2019
  34. PastaPastaPasta referenced this in commit 7849b4298a on Apr 3, 2019
  35. PastaPastaPasta referenced this in commit e52bfb9b05 on Apr 3, 2019
  36. PastaPastaPasta referenced this in commit b90f0b175b on Apr 5, 2019
  37. PastaPastaPasta referenced this in commit eea8027380 on May 6, 2019
  38. barrystyle referenced this in commit dbdb201ca7 on Jan 22, 2020
  39. practicalswift deleted the branch on Apr 10, 2021
  40. furszy referenced this in commit 1e2b5336fe on Sep 25, 2021
  41. DrahtBot locked this on Aug 16, 2022

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-03 09:15 UTC

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