diff options
author | Marko Bencun <marko.bencun@monetas.net> | 2017-06-01 19:13:51 +0200 |
---|---|---|
committer | Marko Bencun <marko.bencun@monetas.net> | 2017-07-22 09:55:57 +0200 |
commit | f228b8e16308ef33792f54360f0f2c2f8310b158 (patch) | |
tree | ef32fe6784c4b9662f3a3653bae26cb4a5e87146 | |
parent | 420238d3103aa5c2e0ad29be840ba5d04b9d243e (diff) |
remove some unused functions
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
-rw-r--r-- | src/net.cpp | 1 | ||||
-rw-r--r-- | src/net.h | 2 | ||||
-rw-r--r-- | src/netaddress.cpp | 5 | ||||
-rw-r--r-- | src/netaddress.h | 1 | ||||
-rw-r--r-- | src/warnings.cpp | 6 | ||||
-rw-r--r-- | src/warnings.h | 1 |
6 files changed, 0 insertions, 16 deletions
diff --git a/src/net.cpp b/src/net.cpp index 5bf3af7ea3..b4b2de09f6 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2691,7 +2691,6 @@ int CConnman::GetBestHeight() const } unsigned int CConnman::GetReceiveFloodSize() const { return nReceiveFloodSize; } -unsigned int CConnman::GetSendBufferSize() const{ return nSendBufferMaxSize; } 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) : nTimeConnected(GetSystemTimeInSeconds()), @@ -242,8 +242,6 @@ public: bool DisconnectNode(const std::string& node); bool DisconnectNode(NodeId id); - unsigned int GetSendBufferSize() const; - ServiceFlags GetLocalServices() const; //!set the max outbound target in bytes diff --git a/src/netaddress.cpp b/src/netaddress.cpp index 110e778fbd..f31b2fc49b 100644 --- a/src/netaddress.cpp +++ b/src/netaddress.cpp @@ -598,11 +598,6 @@ std::string CService::ToString() const return ToStringIPPort(); } -void CService::SetPort(unsigned short portIn) -{ - port = portIn; -} - CSubNet::CSubNet(): valid(false) { diff --git a/src/netaddress.h b/src/netaddress.h index 80716600d1..61afe0f1fe 100644 --- a/src/netaddress.h +++ b/src/netaddress.h @@ -148,7 +148,6 @@ class CService : public CNetAddr CService(const struct in_addr& ipv4Addr, unsigned short port); CService(const struct sockaddr_in& addr); void Init(); - void SetPort(unsigned short portIn); unsigned short GetPort() const; bool GetSockAddr(struct sockaddr* paddr, socklen_t *addrlen) const; bool SetSockAddr(const struct sockaddr* paddr); diff --git a/src/warnings.cpp b/src/warnings.cpp index 2c1b1b0e12..75ccfeb116 100644 --- a/src/warnings.cpp +++ b/src/warnings.cpp @@ -37,12 +37,6 @@ void SetfLargeWorkInvalidChainFound(bool flag) fLargeWorkInvalidChainFound = flag; } -bool GetfLargeWorkInvalidChainFound() -{ - LOCK(cs_warnings); - return fLargeWorkInvalidChainFound; -} - std::string GetWarnings(const std::string& strFor) { std::string strStatusBar; diff --git a/src/warnings.h b/src/warnings.h index fd0ca53942..e8e982c0e3 100644 --- a/src/warnings.h +++ b/src/warnings.h @@ -13,7 +13,6 @@ void SetMiscWarning(const std::string& strWarning); void SetfLargeWorkForkFound(bool flag); bool GetfLargeWorkForkFound(); void SetfLargeWorkInvalidChainFound(bool flag); -bool GetfLargeWorkInvalidChainFound(); /** Format a string that describes several potential problems detected by the core. * strFor can have three values: * - "rpc": get critical warnings, which should put the client in safe mode if non-empty |