MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / get_rpc_proxy

Function get_rpc_proxy

test/functional/test_framework/util.py:244–267  ·  view source on GitHub ↗

Args: url (str): URL of the RPC server to call node_number (int): the node number (or id) that this calls to Kwargs: timeout (int): HTTP timeout in seconds Returns: AuthServiceProxy. convenience object for making RPC calls.

(url, node_number, timeout=None, coveragedir=None)

Source from the content-addressed store, hash-verified

242 n = None
243
244def get_rpc_proxy(url, node_number, timeout=None, coveragedir=None):
245 """
246 Args:
247 url (str): URL of the RPC server to call
248 node_number (int): the node number (or id) that this calls to
249
250 Kwargs:
251 timeout (int): HTTP timeout in seconds
252
253 Returns:
254 AuthServiceProxy. convenience object for making RPC calls.
255
256 """
257 proxy_kwargs = {}
258 if timeout is not None:
259 proxy_kwargs['timeout'] = timeout
260
261 proxy = AuthServiceProxy(url, **proxy_kwargs)
262 proxy.url = url # store URL on proxy for info
263
264 coverage_logfile = coverage.get_filename(
265 coveragedir, node_number) if coveragedir else None
266
267 return coverage.AuthServiceProxyWrapper(proxy, coverage_logfile)
268
269def p2p_port(n):
270 assert(n <= MAX_NODES)

Callers 3

run_allowip_testMethod · 0.90
__init__Method · 0.90

Calls 1

AuthServiceProxyClass · 0.85

Tested by 1