MCPcopy Create free account
hub / github.com/ElementsProject/elements / rpc_url

Function rpc_url

test/functional/test_framework/util.py:351–361  ·  view source on GitHub ↗
(datadir, i, chain, rpchost)

Source from the content-addressed store, hash-verified

349
350
351def rpc_url(datadir, i, chain, rpchost):
352 rpc_u, rpc_p = get_auth_cookie(datadir, chain)
353 host = '127.0.0.1'
354 port = rpc_port(i)
355 if rpchost:
356 parts = rpchost.split(':')
357 if len(parts) == 2:
358 host, port = parts
359 else:
360 host = rpchost
361 return "http://%s:%s@%s:%d" % (rpc_u, rpc_p, host, int(port))
362
363
364# Node functions

Callers 2

run_allowip_testMethod · 0.90

Calls 2

get_auth_cookieFunction · 0.70
rpc_portFunction · 0.70

Tested by 1