mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-28 13:02:38 +02:00
net_permissions: Include "addr" permission on implicit whitelist entries
This commit is contained in:
parent
99bf68b106
commit
1a8cd10e82
@ -573,6 +573,7 @@ void CConnman::AddWhitelistPermissionFlags(NetPermissionFlags& flags, const CNet
|
||||
}
|
||||
NetPermissions::AddFlag(flags, NetPermissionFlags::Mempool);
|
||||
NetPermissions::AddFlag(flags, NetPermissionFlags::NoBan);
|
||||
NetPermissions::AddFlag(flags, NetPermissionFlags::Addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ class P2PPermissionsTests(BitcoinTestFramework):
|
||||
# default permissions (no specific permissions)
|
||||
["-whitelist=127.0.0.1"],
|
||||
# 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(
|
||||
# no permission (even with forcerelay)
|
||||
@ -43,14 +43,14 @@ class P2PPermissionsTests(BitcoinTestFramework):
|
||||
self.checkpermission(
|
||||
# relay permission removed (no specific permissions)
|
||||
["-whitelist=127.0.0.1", "-whitelistrelay=0"],
|
||||
["noban", "mempool", "download"])
|
||||
["addr", "noban", "mempool", "download"])
|
||||
|
||||
self.checkpermission(
|
||||
# forcerelay and relay permission added
|
||||
# Legacy parameter interaction which set whitelistrelay to true
|
||||
# if whitelistforcerelay is true
|
||||
["-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
|
||||
# For this, we need to use whitebind instead of bind
|
||||
|
Loading…
Reference in New Issue
Block a user