From 16052f10aed7070d280a556c79c66a136429a0ea Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 29 Dec 2020 08:55:58 +0100 Subject: [PATCH] Merge #20791: p2p: remove unused legacyWhitelisted in AcceptConnection() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 8f9ca31782372fb60377ef319fefd727bb8c5d75 p2p: remove unused legacyWhitelisted variable (Jon Atack) Pull request description: Noticed while compiling master: ``` net.cpp: In member function ‘void CConnman::AcceptConnection(const CConnman::ListenSocket&)’: net.cpp:1041:10: warning: variable ‘legacyWhitelisted’ set but not used [-Wunused-but-set-variable] 1041 | bool legacyWhitelisted = false; | ^~~~~~~~~~~~~~~~~ ``` ACKs for top commit: glozow: utACK https://github.com/bitcoin/bitcoin/pull/20791/commits/8f9ca31782372fb60377ef319fefd727bb8c5d75 MarcoFalke: review ACK 8f9ca31782372fb60377ef319fefd727bb8c5d75 Tree-SHA512: e3fb94d3d34b364b063a115ef9ed06cfd58729a790ba6ed27c7c32430fabf3ca0aa61bc6d33a1236bff802302779c8db28af351208f06c09ad12ce4873c244a6 --- src/net.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/net.cpp b/src/net.cpp index 34a3ec0ba9..c884ed264c 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1893,14 +1893,12 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr&& sock, int nMaxInbound = nMaxConnections - m_max_outbound; AddWhitelistPermissionFlags(permission_flags, addr); - bool legacyWhitelisted = false; if (NetPermissions::HasFlag(permission_flags, NetPermissionFlags::Implicit)) { NetPermissions::ClearFlag(permission_flags, NetPermissionFlags::Implicit); if (gArgs.GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY)) NetPermissions::AddFlag(permission_flags, NetPermissionFlags::ForceRelay); if (gArgs.GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY)) NetPermissions::AddFlag(permission_flags, NetPermissionFlags::Relay); NetPermissions::AddFlag(permission_flags, NetPermissionFlags::Mempool); NetPermissions::AddFlag(permission_flags, NetPermissionFlags::NoBan); - legacyWhitelisted = true; } {