Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_net.py
Show All 27 Lines | |||||
) | ) | ||||
def assert_net_servicesnames(servicesflag, servicenames): | def assert_net_servicesnames(servicesflag, servicenames): | ||||
"""Utility that checks if all flags are correctly decoded in | """Utility that checks if all flags are correctly decoded in | ||||
`getpeerinfo` and `getnetworkinfo`. | `getpeerinfo` and `getnetworkinfo`. | ||||
:param servicesflag: The services as an integer. | :param servicesflag: The services as an integer. | ||||
:param servicesnames: The list of decoded services names, as strings. | :param servicenames: The list of decoded services names, as strings. | ||||
""" | """ | ||||
servicesflag_generated = 0 | servicesflag_generated = 0 | ||||
for servicename in servicenames: | for servicename in servicenames: | ||||
servicesflag_generated |= getattr( | servicesflag_generated |= getattr( | ||||
test_framework.messages, 'NODE_' + servicename) | test_framework.messages, 'NODE_' + servicename) | ||||
assert servicesflag_generated == servicesflag | assert servicesflag_generated == servicesflag | ||||
▲ Show 20 Lines • Show All 156 Lines • Show Last 20 Lines |