Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p_permissions.py
Show All 17 Lines | |||||
class P2PPermissionsTests(BitcoinTestFramework): | class P2PPermissionsTests(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.num_nodes = 2 | self.num_nodes = 2 | ||||
self.setup_clean_chain = True | self.setup_clean_chain = True | ||||
self.extra_args = [[], []] | self.extra_args = [[], []] | ||||
def run_test(self): | def run_test(self): | ||||
self.checkpermission( | self.checkpermission( | ||||
# relay permission added | # default permissions (no specific permissions) | ||||
["-whitelist=127.0.0.1", "-whitelistrelay"], | ["-whitelist=127.0.0.1"], | ||||
["relay", "noban", "mempool"], | ["relay", "noban", "mempool"], | ||||
True) | True) | ||||
self.checkpermission( | self.checkpermission( | ||||
# relay permission removed (no specific permissions) | |||||
["-whitelist=127.0.0.1", "-whitelistrelay=0"], | |||||
["noban", "mempool"], | |||||
True) | |||||
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"], | ["forcerelay", "relay", "noban", "mempool"], | ||||
True) | True) | ||||
# Let's make sure permissions are merged correctly | # Let's make sure permissions are merged correctly | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |