-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Remove unused code #9987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unused code #9987
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
utACK |
@@ -132,10 +132,6 @@ class CDBIterator | |||
return true; | |||
} | |||
|
|||
unsigned int GetKeySize() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetKeySize
is referenced in the comment in src/coins.h
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paveljanik Good point! Reference in src/coins.h
removed. Squashed and pushed as well :-)
b6eef0d
to
20da129
Compare
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. |
@JeremyRubin Perhaps I should add them back but commented out. Sounds good? :-) |
Agree, let's just put those back. There is zero overhead to defining a few extra constants for clarity even if unused. |
src/wallet/db.h
Outdated
@@ -300,12 +300,6 @@ class CDB | |||
return (ret == 0); | |||
} | |||
|
|||
bool ReadVersion(int& nVersion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
utACK 20da129626849511b41a870333dd0144eeaf0c6d, agree with @laanwj about |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK on removing the clearly outdated code (such as in test/) Not sure about the gains on removing some of the other methods.
@@ -61,8 +61,6 @@ class CChainParams | |||
int GetDefaultPort() const { return nDefaultPort; } | |||
|
|||
const CBlock& GenesisBlock() const { return genesis; } | |||
/** Make miner wait to have peers to avoid wasting work */ | |||
bool MiningRequiresPeers() const { return fMiningRequiresPeers; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either keep everything or remove the member as well, no?
20da129
to
8dc957a
Compare
@JeremyRubin @laanwj The changes to @laanwj @jonasschnelli @MarcoFalke Thanks for noticing! Thanks for reviewing! Please let me know if any further adjustments are needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-ACK
ACK 8dc957a |
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a resolve usage of `MiningRequiresPeers()` remove `fMiningRequiresPeers`
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a resolve usage of `MiningRequiresPeers()` remove `fMiningRequiresPeers`
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a resolve usage of `MiningRequiresPeers()` remove `fMiningRequiresPeers`
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a resolve usage of `MiningRequiresPeers()` remove `fMiningRequiresPeers`
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a resolve usage of `MiningRequiresPeers()` remove `fMiningRequiresPeers`
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a resolve usage of `MiningRequiresPeers()` remove `fMiningRequiresPeers`
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a resolve usage of `MiningRequiresPeers()` remove `fMiningRequiresPeers`
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a resolve usage of `MiningRequiresPeers()` remove `fMiningRequiresPeers`
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a resolve usage of `MiningRequiresPeers()` remove `fMiningRequiresPeers`
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a resolve usage of `MiningRequiresPeers()` remove `fMiningRequiresPeers`
8dc957a Remove unused code (practicalswift) Tree-SHA512: c7bb286e3b92e42fec8aa1ac2491fd38be36602efca16b4bdc4e9d5ada75c11d99e7713092ec13794abd69d5ef2c732b86209a6d01710e5ebf6fc51b8a65c92a resolve usage of `MiningRequiresPeers()` remove `fMiningRequiresPeers`
223bda1 key.cpp: Use PubKey constant size. (furszy) 0c6f95d remove unused code (furszy) Pull request description: Straightforward unused code cleanup coming from bitcoin#9987 and bitcoin#10075. ACKs for top commit: random-zebra: utACK 223bda1 Fuzzbawls: ACK 223bda1 Tree-SHA512: 9937edbcf4f59ba7835f889ea4638d9bd32e28e3cd865ed043a1f0856ab8ec2b08a3cd4f851536db1703b7f21d4910f22fb905231f73dd0ae7adecd6f5a07055
No description provided.