diff --git a/src/net.cpp b/src/net.cpp index 7cb2ed1b12..6d823c3c1e 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -588,6 +588,7 @@ void CConnman::AddWhitelistPermissionFlags(NetPermissionFlags& flags, const CNet } NetPermissions::AddFlag(flags, NetPermissionFlags::Mempool); NetPermissions::AddFlag(flags, NetPermissionFlags::NoBan); + NetPermissions::AddFlag(flags, NetPermissionFlags::Addr); } } diff --git a/test/functional/p2p_permissions.py b/test/functional/p2p_permissions.py index bbf0328757..cd063dbd12 100755 --- a/test/functional/p2p_permissions.py +++ b/test/functional/p2p_permissions.py @@ -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