From 3b7d3c90d958ac1264df6bebd20929771a8da2b6 Mon Sep 17 00:00:00 2001 From: Pasta Date: Sat, 7 Sep 2019 22:56:22 -0500 Subject: [PATCH] Merge #10501: remove some unused functions -- ignoring removal of SetPort due to dash#2168 f228b8e remove some unused functions (Marko Bencun) Pull request description: 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 Tree-SHA512: ea8e5498bec981e42e1342c171c37723c2f5e575c7d6c1a524d9c6cd9b332bdd0d84fddf9e14ca011bb49fb82bd037386382c9afc546b3c2231ae548358bd4f4 Signed-off-by: Pasta --- src/net.cpp | 1 - src/net.h | 2 -- src/warnings.cpp | 6 ------ src/warnings.h | 1 - 4 files changed, 10 deletions(-) diff --git a/src/net.cpp b/src/net.cpp index ced7fad16..d122c09e8 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -3090,7 +3090,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()), diff --git a/src/net.h b/src/net.h index aec925247..2de5192b4 100644 --- a/src/net.h +++ b/src/net.h @@ -398,8 +398,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/warnings.cpp b/src/warnings.cpp index 148f1dd8f..f097d09be 100644 --- a/src/warnings.cpp +++ b/src/warnings.cpp @@ -38,12 +38,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 fd0ca5394..e8e982c0e 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