qa: Fix service flag comparison check in rpc_net test
Summary:
The tests added in PR16850 assumed that the field localservices returned by getnetworkinfo was a string representation of an integer, when it is really a string representation of a hex. This fixes the test to decode the field properly and do the correct bitwise comparisons.
This is a backport of Core PR16991
Test Plan:
ninja && ./test/functional/test_runner.py rpc_net.py
$ bitcoin-cli getnetworkinfo ... "localservices": "0000000000000425", "localservicesnames": [ "NETWORK", "BLOOM", "BITCOIN_CASH", "NETWORK_LIMITED" ], ... $ python >>> int("425", 16) 1061 >>> NODE_NETWORK = (1 << 0) >>> NODE_BLOOM = (1 << 2) >>> NODE_BITCOIN_CASH = (1 << 5) >>> NODE_NETWORK_LIMITED = (1 << 10) >>> NODE_NETWORK | NODE_BLOOM | NODE_BITCOIN_CASH | NODE_NETWORK_LIMITED 1061 >>>
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix, Fabien
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D8083