mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
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 8f9ca31782
MarcoFalke:
review ACK 8f9ca31782372fb60377ef319fefd727bb8c5d75
Tree-SHA512: e3fb94d3d34b364b063a115ef9ed06cfd58729a790ba6ed27c7c32430fabf3ca0aa61bc6d33a1236bff802302779c8db28af351208f06c09ad12ce4873c244a6
This commit is contained in:
parent
42d4f9a9b9
commit
16052f10ae
@ -1893,14 +1893,12 @@ void CConnman::CreateNodeFromAcceptedSocket(std::unique_ptr<Sock>&& sock,
|
|||||||
int nMaxInbound = nMaxConnections - m_max_outbound;
|
int nMaxInbound = nMaxConnections - m_max_outbound;
|
||||||
|
|
||||||
AddWhitelistPermissionFlags(permission_flags, addr);
|
AddWhitelistPermissionFlags(permission_flags, addr);
|
||||||
bool legacyWhitelisted = false;
|
|
||||||
if (NetPermissions::HasFlag(permission_flags, NetPermissionFlags::Implicit)) {
|
if (NetPermissions::HasFlag(permission_flags, NetPermissionFlags::Implicit)) {
|
||||||
NetPermissions::ClearFlag(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("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY)) NetPermissions::AddFlag(permission_flags, NetPermissionFlags::ForceRelay);
|
||||||
if (gArgs.GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY)) NetPermissions::AddFlag(permission_flags, NetPermissionFlags::Relay);
|
if (gArgs.GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY)) NetPermissions::AddFlag(permission_flags, NetPermissionFlags::Relay);
|
||||||
NetPermissions::AddFlag(permission_flags, NetPermissionFlags::Mempool);
|
NetPermissions::AddFlag(permission_flags, NetPermissionFlags::Mempool);
|
||||||
NetPermissions::AddFlag(permission_flags, NetPermissionFlags::NoBan);
|
NetPermissions::AddFlag(permission_flags, NetPermissionFlags::NoBan);
|
||||||
legacyWhitelisted = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user