Args: url: URL of the RPC server to call node_number: the node number (or id) that this calls to Kwargs: timeout: HTTP timeout in seconds coveragedir: Directory Returns: AuthServiceProxy. convenience object for making RPC calls.
(url: str, node_number: int, *, timeout: int=None, coveragedir: str=None)
| 315 | |
| 316 | |
| 317 | def get_rpc_proxy(url: str, node_number: int, *, timeout: int=None, coveragedir: str=None) -> coverage.AuthServiceProxyWrapper: |
| 318 | """ |
| 319 | Args: |
| 320 | url: URL of the RPC server to call |
| 321 | node_number: the node number (or id) that this calls to |
| 322 | |
| 323 | Kwargs: |
| 324 | timeout: HTTP timeout in seconds |
| 325 | coveragedir: Directory |
| 326 | |
| 327 | Returns: |
| 328 | AuthServiceProxy. convenience object for making RPC calls. |
| 329 | |
| 330 | """ |
| 331 | proxy_kwargs = {} |
| 332 | if timeout is not None: |
| 333 | proxy_kwargs['timeout'] = int(timeout) |
| 334 | |
| 335 | proxy = AuthServiceProxy(url, **proxy_kwargs) |
| 336 | |
| 337 | coverage_logfile = coverage.get_filename(coveragedir, node_number) if coveragedir else None |
| 338 | |
| 339 | return coverage.AuthServiceProxyWrapper(proxy, url, coverage_logfile) |
| 340 | |
| 341 | |
| 342 | def p2p_port(n): |