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

Function rpc_url

test/functional/test_framework/util.py:276–286  ·  view source on GitHub ↗
(datadir, i, rpchost=None)

Source from the content-addressed store, hash-verified

274 return PORT_MIN + PORT_RANGE + n + (MAX_NODES * PortSeed.n) % (PORT_RANGE - 1 - MAX_NODES)
275
276def rpc_url(datadir, i, rpchost=None):
277 rpc_u, rpc_p = get_auth_cookie(datadir)
278 host = '127.0.0.1'
279 port = rpc_port(i)
280 if rpchost:
281 parts = rpchost.split(':')
282 if len(parts) == 2:
283 host, port = parts
284 else:
285 host = rpchost
286 return "http://%s:%s@%s:%d" % (rpc_u, rpc_p, host, int(port))
287
288# Node functions
289################

Callers 2

run_allowip_testMethod · 0.90

Calls 2

get_auth_cookieFunction · 0.85
rpc_portFunction · 0.85

Tested by 1