As per #16787 (comment), fixes #16844.
This adds a test for both commands in the first commit and renames the test for getnetworkinfo in the second commit.
As per #16787 (comment), fixes #16844.
This adds a test for both commands in the first commit and renames the test for getnetworkinfo in the second commit.
Could someone restart the stopped job (583339836) please ? EDIT: Thanks !
124 | @@ -104,6 +125,18 @@ def _test_getpeerinfo(self): 125 | assert_equal(peer_info[1][0]['addrbind'], peer_info[0][0]['addr']) 126 | assert_equal(peer_info[0][0]['minfeefilter'], Decimal("0.00000500")) 127 | assert_equal(peer_info[1][0]['minfeefilter'], Decimal("0.00001000")) 128 | + # check the `servicesnames` field 129 | + for info in peer_info: 130 | + if int(info[0]["services"]) & NODE_NETWORK:
Could move this into a function for less duplication?
assert_network_service_names(services=int(info[0]["services"]), names=info[0]["servicesnames"])
Agree.
Done
ACK
Concept ACK, thanks for writing tests.
In getpeerinfo and getnetworkinfo
Since it's the name of the RPC call
Rebased to regroup into a function as suggested by @MarcoFalke.
ACK 1d524c62ea679aa89770f9fdcd72b84f013639cb