Merge #20791: p2p: remove unused legacyWhitelisted in AcceptConnection()

8f9ca31782 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 8f9ca31782
  MarcoFalke:
    review ACK 8f9ca31782

Tree-SHA512: e3fb94d3d34b364b063a115ef9ed06cfd58729a790ba6ed27c7c32430fabf3ca0aa61bc6d33a1236bff802302779c8db28af351208f06c09ad12ce4873c244a6
This commit is contained in:
MarcoFalke 2020-12-29 08:55:58 +01:00
commit 069f37c0fd
No known key found for this signature in database
GPG Key ID: D2EA4850E7528B25

View File

@ -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;
}
{