aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-12-29 08:55:58 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-12-29 08:56:01 +0100
commit069f37c0fd42404c3873a3ad5725e494baa7147d (patch)
tree715a5d8a7dfe8a06f0fdf1b35c5b15d2780637bd
parentd875bcc8f9ace495845df945018c2bc9db5bbafc (diff)
parent8f9ca31782372fb60377ef319fefd727bb8c5d75 (diff)
Merge #20791: p2p: remove unused legacyWhitelisted in AcceptConnection()
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
-rw-r--r--src/net.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 1e24b0e2da..106f39568a 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1038,14 +1038,12 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
NetPermissionFlags permissionFlags = NetPermissionFlags::PF_NONE;
hListenSocket.AddSocketPermissionFlags(permissionFlags);
AddWhitelistPermissionFlags(permissionFlags, addr);
- bool legacyWhitelisted = false;
if (NetPermissions::HasFlag(permissionFlags, NetPermissionFlags::PF_ISIMPLICIT)) {
NetPermissions::ClearFlag(permissionFlags, PF_ISIMPLICIT);
if (gArgs.GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY)) NetPermissions::AddFlag(permissionFlags, PF_FORCERELAY);
if (gArgs.GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY)) NetPermissions::AddFlag(permissionFlags, PF_RELAY);
NetPermissions::AddFlag(permissionFlags, PF_MEMPOOL);
NetPermissions::AddFlag(permissionFlags, PF_NOBAN);
- legacyWhitelisted = true;
}
{