Identified with cppcheck --enable=unusedFunction ..
- GetSendBufferSize()'s last use removed in 991955e
- SetPort()'s last use removed in 7e195e8
- GetfLargeWorkInvalidChainFound() was introduced in e3ba0ef and never used
Identified with cppcheck --enable=unusedFunction ..
utACK ebd0c95
Excellent! Can't believe I haven't found these myself :-)
I guess the wallet.h changes don't belong to this patch-set.
Otherwise utACK.
@jonasschnelli good catch, I actually removed the definition in wallet.h as well but it somehow didn't make it into the commit. I updated the commit. The rest is just trailing whitespace removed by my editor.
Could you mention the commits which removed the last use of the functions?
@MarcoFalke done.
139 | @@ -140,7 +140,6 @@ class CService : public CNetAddr 140 | CService(const struct in_addr& ipv4Addr, unsigned short port); 141 | CService(const struct sockaddr_in& addr); 142 | void Init(); 143 | - void SetPort(unsigned short portIn);
Although not used, this is nice setter...
Still, unused code is just dead weight and confusing. In this case, it implies that something external to the class is setting the port, but nothing is.
utACK 65c993c
utACK 65c993c07ede6fb1616a5e4843753b16c252ef4d
utACK 65c993c
Needs rebase
Rebased.
241 | @@ -242,7 +242,7 @@ class CConnman 242 | bool DisconnectNode(const std::string& node); 243 | bool DisconnectNode(NodeId id); 244 | 245 | - unsigned int GetSendBufferSize() const; 246 | + void AddWhitelistedRange(const CSubNet &subnet);
Wait, bad rebase here?
Yes :fearful: good catch, thank you. Fixed.
utACK
Identified with `cppcheck --enable=unusedFunction .`.
- GetSendBufferSize()'s last use removed in
991955ee81034dc3fbc1c2a8e60c04fc9e0b538c
- SetPort()'s last use removed in
7e195e8459ad741368db6bb574981fccb1707268
- GetfLargeWorkInvalidChainFound() was introduced in
e3ba0ef95636290a3bb597ddd25d13ea13b034aa and never used
Rebased.
utACK f228b8e16308ef33792f54360f0f2c2f8310b158