mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-13 03:30:42 +02:00
Merge netperms_implicit_addr
This commit is contained in:
commit
9ffb23bb84
@ -581,6 +581,7 @@ void CConnman::AddWhitelistPermissionFlags(NetPermissionFlags& flags, const CNet
|
|||||||
if (whitelist_relay) NetPermissions::AddFlag(flags, NetPermissionFlags::Relay);
|
if (whitelist_relay) NetPermissions::AddFlag(flags, NetPermissionFlags::Relay);
|
||||||
NetPermissions::AddFlag(flags, NetPermissionFlags::Mempool);
|
NetPermissions::AddFlag(flags, NetPermissionFlags::Mempool);
|
||||||
NetPermissions::AddFlag(flags, NetPermissionFlags::NoBan);
|
NetPermissions::AddFlag(flags, NetPermissionFlags::NoBan);
|
||||||
|
NetPermissions::AddFlag(flags, NetPermissionFlags::Addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ class P2PPermissionsTests(BitcoinTestFramework):
|
|||||||
# default permissions (no specific permissions)
|
# default permissions (no specific permissions)
|
||||||
["-whitelist=127.0.0.1"],
|
["-whitelist=127.0.0.1"],
|
||||||
# Make sure the default values in the command line documentation match the ones here
|
# Make sure the default values in the command line documentation match the ones here
|
||||||
["relay", "noban", "mempool", "download"])
|
["addr", "relay", "noban", "mempool", "download"])
|
||||||
|
|
||||||
self.checkpermission(
|
self.checkpermission(
|
||||||
# no permission (even with forcerelay)
|
# no permission (even with forcerelay)
|
||||||
@ -43,14 +43,14 @@ class P2PPermissionsTests(BitcoinTestFramework):
|
|||||||
self.checkpermission(
|
self.checkpermission(
|
||||||
# relay permission removed (no specific permissions)
|
# relay permission removed (no specific permissions)
|
||||||
["-whitelist=127.0.0.1", "-whitelistrelay=0"],
|
["-whitelist=127.0.0.1", "-whitelistrelay=0"],
|
||||||
["noban", "mempool", "download"])
|
["addr", "noban", "mempool", "download"])
|
||||||
|
|
||||||
self.checkpermission(
|
self.checkpermission(
|
||||||
# forcerelay and relay permission added
|
# forcerelay and relay permission added
|
||||||
# Legacy parameter interaction which set whitelistrelay to true
|
# Legacy parameter interaction which set whitelistrelay to true
|
||||||
# if whitelistforcerelay is true
|
# if whitelistforcerelay is true
|
||||||
["-whitelist=127.0.0.1", "-whitelistforcerelay"],
|
["-whitelist=127.0.0.1", "-whitelistforcerelay"],
|
||||||
["forcerelay", "relay", "noban", "mempool", "download"])
|
["addr", "forcerelay", "relay", "noban", "mempool", "download"])
|
||||||
|
|
||||||
# Let's make sure permissions are merged correctly
|
# Let's make sure permissions are merged correctly
|
||||||
# For this, we need to use whitebind instead of bind
|
# For this, we need to use whitebind instead of bind
|
||||||
|
Loading…
Reference in New Issue
Block a user