Remove unused code #9987
pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:remove-unused-code changing 13 files +0 −78-
practicalswift commented at 11:40 pm on March 13, 2017: contributor
-
dcousens approved
-
dcousens commented at 0:00 am on March 14, 2017: contributorutACK
-
fanquake added the label Refactoring on Mar 14, 2017
-
NicolasDorier commented at 5:31 am on March 14, 2017: contributorutACK
-
in src/dbwrapper.h: 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 insrc/coins.h
.
practicalswift commented at 10:18 pm on March 15, 2017:@paveljanik Good point! Reference insrc/coins.h
removed. Squashed and pushed as well :-)practicalswift force-pushed on Mar 15, 2017JeremyRubin commented at 6:47 am on March 16, 2017: contributorI’d suggest reverting interpreter.cpp, unless anyone strongly objects. Seeing those (albeit unused) static consts helped me to understand the script code more quickly.practicalswift commented at 7:14 am on March 16, 2017: contributor@JeremyRubin Perhaps I should add them back but commented out. Sounds good? :-)laanwj commented at 10:20 am on March 16, 2017: memberI’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.
in src/wallet/db.h: 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.jonasschnelli commented at 11:48 am on March 16, 2017: contributorin 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 0:21 am on March 17, 2017:Either keep everything or remove the member as well, no?MarcoFalke commented at 0:24 am on March 17, 2017: memberACK on removing the clearly outdated code (such as in test/) Not sure about the gains on removing some of the other methods.Remove unused code 8dc957ae06practicalswift force-pushed on Mar 17, 2017practicalswift commented at 3:40 am on March 17, 2017: contributor@JeremyRubin @laanwj The changes to
interpreter.cpp
have now been reverted as suggested. @laanwj @jonasschnelliReadVersion(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.
dcousens approveddcousens commented at 3:48 am on March 17, 2017: contributorre-ACKpaveljanik commented at 8:42 am on March 18, 2017: contributorlaanwj merged this on Mar 18, 2017laanwj closed this on Mar 18, 2017
laanwj referenced this in commit aab1e55860 on Mar 18, 2017PastaPastaPasta referenced this in commit 4f437bb5ce on Mar 10, 2019PastaPastaPasta referenced this in commit 9727c3e16f on Mar 11, 2019PastaPastaPasta referenced this in commit b3b69bef46 on Mar 11, 2019PastaPastaPasta referenced this in commit c6626ed0b3 on Mar 12, 2019PastaPastaPasta referenced this in commit e36935efcd on Mar 13, 2019UdjinM6 referenced this in commit cb7a475f0d on Mar 13, 2019PastaPastaPasta referenced this in commit bce0a7afbc on Mar 13, 2019PastaPastaPasta referenced this in commit 11185273ad on Mar 14, 2019PastaPastaPasta referenced this in commit 32221d37db on Mar 14, 2019PastaPastaPasta referenced this in commit 8ebb775d4f on Mar 15, 2019PastaPastaPasta referenced this in commit c3b425e2e2 on Mar 16, 2019PastaPastaPasta referenced this in commit 7849b4298a on Apr 3, 2019PastaPastaPasta referenced this in commit e52bfb9b05 on Apr 3, 2019PastaPastaPasta referenced this in commit b90f0b175b on Apr 5, 2019PastaPastaPasta referenced this in commit eea8027380 on May 6, 2019barrystyle referenced this in commit dbdb201ca7 on Jan 22, 2020practicalswift deleted the branch on Apr 10, 2021furszy referenced this in commit 1e2b5336fe on Sep 25, 2021DrahtBot 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: 2024-12-22 18:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me