Skip to content

Commit f228b8e

Browse files
author
Marko Bencun
committed
remove some unused functions
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
1 parent 420238d commit f228b8e

File tree

6 files changed

+0
-16
lines changed

6 files changed

+0
-16
lines changed

src/net.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2691,7 +2691,6 @@ int CConnman::GetBestHeight() const
26912691
}
26922692

26932693
unsigned int CConnman::GetReceiveFloodSize() const { return nReceiveFloodSize; }
2694-
unsigned int CConnman::GetSendBufferSize() const{ return nSendBufferMaxSize; }
26952694

26962695
CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn, SOCKET hSocketIn, const CAddress& addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn, const CAddress &addrBindIn, const std::string& addrNameIn, bool fInboundIn) :
26972696
nTimeConnected(GetSystemTimeInSeconds()),

src/net.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,6 @@ class CConnman
242242
bool DisconnectNode(const std::string& node);
243243
bool DisconnectNode(NodeId id);
244244

245-
unsigned int GetSendBufferSize() const;
246-
247245
ServiceFlags GetLocalServices() const;
248246

249247
//!set the max outbound target in bytes

src/netaddress.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,6 @@ std::string CService::ToString() const
598598
return ToStringIPPort();
599599
}
600600

601-
void CService::SetPort(unsigned short portIn)
602-
{
603-
port = portIn;
604-
}
605-
606601
CSubNet::CSubNet():
607602
valid(false)
608603
{

src/netaddress.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ class CService : public CNetAddr
148148
CService(const struct in_addr& ipv4Addr, unsigned short port);
149149
CService(const struct sockaddr_in& addr);
150150
void Init();
151-
void SetPort(unsigned short portIn);
152151
unsigned short GetPort() const;
153152
bool GetSockAddr(struct sockaddr* paddr, socklen_t *addrlen) const;
154153
bool SetSockAddr(const struct sockaddr* paddr);

src/warnings.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ void SetfLargeWorkInvalidChainFound(bool flag)
3737
fLargeWorkInvalidChainFound = flag;
3838
}
3939

40-
bool GetfLargeWorkInvalidChainFound()
41-
{
42-
LOCK(cs_warnings);
43-
return fLargeWorkInvalidChainFound;
44-
}
45-
4640
std::string GetWarnings(const std::string& strFor)
4741
{
4842
std::string strStatusBar;

src/warnings.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ void SetMiscWarning(const std::string& strWarning);
1313
void SetfLargeWorkForkFound(bool flag);
1414
bool GetfLargeWorkForkFound();
1515
void SetfLargeWorkInvalidChainFound(bool flag);
16-
bool GetfLargeWorkInvalidChainFound();
1716
/** Format a string that describes several potential problems detected by the core.
1817
* strFor can have three values:
1918
* - "rpc": get critical warnings, which should put the client in safe mode if non-empty

0 commit comments

Comments
 (0)